Replies: 2 comments 2 replies
-
Thank you for the kind words. Yep, Kryptor currently doesn't return any error codes. I've not thought about it at all actually. It seems like a good idea, but it could be quite messy to implement.
So, it's a tricky one. Maybe I'm exaggerating how difficult this would be, maybe not. I've never experimented with error codes. |
Beta Was this translation helpful? Give feedback.
-
I agree with you about the amount of work it takes to implement this cleanly and without any side effects. I bet you end up implementing Exceptions in most parts of your code which get caught and translated into exit codes at "top level". The advantage is then, as you stated, that the code is already prepared for unit testing. As for me, I love being done with this part of the job ;-) Considering the different error codes I think: two error codes are better than no error codes ;-) From my very simple point of view there should be two modes:
For the "batch mode " I would prefer the default behavior to be "exit on first error". If you want to change that behavior you can use the cmd line switch: --treat-errors-as-warnings Perhaps this is a bit too simplistic. |
Beta Was this translation helpful? Give feedback.
-
Dear all,
First of all: Thank you Samuel Lucas for creating such a nice tool. That kind of tools are quiet rare and I love the way you care about the details (especially when it comes to cryptography).
I currently try to use your tool for automation purposes and - as far as I can see - it does not support return codes (signalizing the OS that something went wrong).
I propose to add some return codes
e.g. DigitalSignatures/FileSigning.cs:80:
Environment.Exit(-1);
Best regards
Markus
PS: I'm not a C# developer so please excuse me if the example above is wrong.
Beta Was this translation helpful? Give feedback.
All reactions