Full rewrite #24

Open
emma wants to merge 30 commits from rewrite into main
Owner

Closes #11
Closes #19
Closes #21
Closes #22
Closes #23

Closes #11 Closes #19 Closes #21 Closes #22 Closes #23
emma added this to the Release milestone 2023-03-23 04:22:24 +00:00
emma added the
documentation
enhancement
help wanted
labels 2023-03-23 04:22:24 +00:00
emma self-assigned this 2023-03-23 04:22:24 +00:00
lilithium-hydride was assigned by emma 2023-03-23 04:22:24 +00:00
emma added 8 commits 2023-03-23 04:22:25 +00:00
spookdot was assigned by emma 2023-03-23 04:24:17 +00:00
BlankParenthesis was assigned by emma 2023-03-23 04:24:17 +00:00
emma added 1 commit 2023-03-23 04:39:11 +00:00
emma added 1 commit 2023-03-23 05:13:31 +00:00
emma added 1 commit 2023-03-23 05:35:05 +00:00
emma added 1 commit 2023-03-23 05:40:52 +00:00
emma added 1 commit 2023-03-23 06:29:52 +00:00
emma added 1 commit 2023-03-24 18:50:14 +00:00
emma added 1 commit 2023-03-25 09:03:32 +00:00
emma added 2 commits 2023-03-25 10:11:48 +00:00
emma added 1 commit 2023-03-25 10:41:18 +00:00
emma added 1 commit 2023-03-25 23:21:20 +00:00
BlankParenthesis added 1 commit 2023-03-26 10:47:19 +00:00
3eac2d2eab
create custom CError trait, using it for errors
The name chosen here is perhaps not ideal, and if you can think of a
better one that should probably be quickly used instead.

This is one option for C exit-code handling which is a lot cleaner than
the existing implementation in my opinion. Much of the cleanup also
comes from the enum error type in config. This enum's implementation
could be a lot cleaner with something like the 'thiserror' crate: the
message method could simply utilize that crate's derived Display
implementation.

Regarding `unwrap_or_else(|e| e.exit())`, it would have been ideal to
simply handle panics with a handler so it could simply be `unwrap()`,
but since panics tend to only pass the error string to the handler, an
exit method seems like the best solution.

Because this enforces consistency of adding the program invokation
before every error message, it has an unfortunate side-effect of the
usage text getting that information duplicated which may be seen as
undesirable. There are some workarounds to this, but I've deferred
deciding how best to do that (if it even is desirable to do so).
BlankParenthesis added 1 commit 2023-03-26 10:57:02 +00:00
emma added 1 commit 2023-03-26 23:08:33 +00:00
emma added 1 commit 2023-03-27 04:01:37 +00:00
emma added 1 commit 2023-03-27 04:13:43 +00:00
emma added 1 commit 2023-03-27 04:32:31 +00:00
emma added 1 commit 2023-03-27 04:33:04 +00:00
emma added 1 commit 2023-03-27 04:44:38 +00:00
emma added 2 commits 2023-03-28 22:27:29 +00:00
emma added 1 commit 2023-04-19 05:03:38 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b rewrite main
git pull origin rewrite

Step 2:

Merge the changes and update on Forgejo.
git checkout main
git merge --no-ff rewrite
git push origin main
Sign in to join this conversation.
No description provided.