https://git.schokokeks.org/derivepassphrase.git/tree/2d5932a0080baf14f1589fcd92b9f9425c2714c3 Recent commits to derivepassphrase.git (2d5932a0080baf14f1589fcd92b9f9425c2714c3) 2024-08-04T09:36:49+02:00 tag:gitlist.org,2012:commit/2d5932a0080baf14f1589fcd92b9f9425c2714c3 Add example for "storeroom"-type data export 2024-08-04T09:36:49+02:00 Marco Ricci m@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/12a294f4fa349a1e484fe56b17309f125bdc5371 Add prototype for "storeroom"-type data export 2024-08-03T23:09:08+02:00 Marco Ricci m@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/e662c2e71c50e57f465fdeb8efb403ed77147e8c Merge topic branch 'issue4-improve-common-error-messages' into master 2024-08-16T17:12:56+02:00 Marco Ricci m@the13thletter.info <pre>* t/issue4-improve-common-error-messages: Add Changelog entry for error message/handling revision Add missing tests for reworked error message handling Fix error message capitalization Fix error bubbling in outdated test Add a specific error class and codes for SSH agent failures Document and handle other errors passed through to the command-line interface Use better error message handling in the command-line interface GitHub: Closes #4. &lt;/pre&gt; tag:gitlist.org,2012:commit/0cec4ae52c864d9f772897fef0e069761d6adf1d Add Changelog entry for error message/handling revision 2024-08-16T17:12:38+02:00 Marco Ricci m@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/a128400376d1f51845e8e75b32281a870fb354a7 Add missing tests for reworked error message handling 2024-08-16T16:31:24+02:00 Marco Ricci m@the13thletter.info <pre>Add missing tests for the revised error messages/classes and error handling code due to a1763e8b5dedbf123856a79ddb0e8395cddd6f88 and 5c6045e10ca9c8b56432711dec5efb98b5892d55. &lt;/pre&gt; tag:gitlist.org,2012:commit/c9e62dd6c58a3b4c627dd5d6dda0b4c4d4ec1330 Fix error message capitalization 2024-08-16T16:21:45+02:00 Marco Ricci m@the13thletter.info <pre>We still use error messages with non-sentence case at multiple places, particularly messages like "no valid SSH key selected". &lt;/pre&gt; tag:gitlist.org,2012:commit/f08cd0300661ac562d049604ee81214ced8aad91 Fix error bubbling in outdated test 2024-08-16T16:19:56+02:00 Marco Ricci m@the13thletter.info <pre>In `tests.test_derivepassphrase_cli:test_230a_config_directory_not_a_file`, we assumed that a `FileExistsError` while storing the configuration file would bubble all the way up to the test harness. This isn't the case anymore, because of a1763e8b5dedbf123856a79ddb0e8395cddd6f88 and 5c6045e10ca9c8b56432711dec5efb98b5892d55... but we actually forgot to update the call to use the new wrapper from 5c6045e10ca9c8b56432711dec5efb98b5892d55. &lt;/pre&gt; tag:gitlist.org,2012:commit/4eb85f64c8f18a55eb83c3909322a78b11ba6c87 Add a specific error class and codes for SSH agent failures 2024-08-16T13:27:20+02:00 Marco Ricci m@the13thletter.info <pre>Add the generic `SSH_AGENT_FAILURE` and `SSH_AGENT_SUCCESS` status codes (as `_types.SSH_AGENT.FAILURE` and `_types.SSH_AGENT.SUCCESS`, respectively), and add an `SSHAgentFailedError` class to signal error returns from the SSH agent. The error class may emit a specific or a generic error message, depending on the status code and error message passed. Rewrite the tests to use actual failure status codes, instead of random magic numbers. Rewrite it further to deal with the `_types.SSH_AGENT` enum instead of numeric codes. This also makes the tests more readable. &lt;/pre&gt; tag:gitlist.org,2012:commit/5c6045e10ca9c8b56432711dec5efb98b5892d55 Document and handle other errors passed through to the command-line interface 2024-08-16T12:48:10+02:00 Marco Ricci m@the13thletter.info <pre>These errors have already been passed through, but they were neither documented nor explicitly handled in the command-line interface with an appropriate error message. &lt;/pre&gt; tag:gitlist.org,2012:commit/a1763e8b5dedbf123856a79ddb0e8395cddd6f88 Use better error message handling in the command-line interface 2024-08-16T12:38:08+02:00 Marco Ricci m@the13thletter.info <pre>Instead of blindly relying on `click.Context.fail`, which causes a usage message to be printed, implement our own error-exit function. Furthermore, since writing the configuration file is prone to similar problems as reading it, include a wrapper for writing the configuration file as well, which ensures errors are properly reported. Due to the rewrite, some error messages changed slightly in phrasing and/or in capitalization. &lt;/pre&gt;