-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: ability to specify exit code with ERR directive #122
Comments
I'm doing a bit of dabbling just to look at this request.
I added a few in my own codebase just to check/look at the panic stuff. I think perhaps if we allow user errors from 128 onwards (or 64, if it must be smaller), that would fit with dasm's current exit strategy. |
It looks like codes 3-125 and 166-254 can be user-defined exit codes (at least on Linux): |
Pretty sure those are specific to the bash process itself. In terms of system standards, there's the sysexits.h file, which on my Linux build ends at signal 78. It's also my understanding that sysexits.h is rarely followed. |
Hi
I'm sure that many people use DASM as part of a toolchain. I think it would be convenient if we could specify an exit code as a parameter of the ERR directive, for example:
This would exit DASM with an exit code 1. This way the next tool in the chain would know why the compilation failed and could be programmed to take appropriate action.
Currently the only way to solve this is to ECHO some kind of error code and try to parse the tail of DASM's output. It works but it is not very convenient.
What do you think?
PS. Okay, exit code 1 is a bad example, I can see now that DASM defines a lot of internal exit codes... but you get the idea.
The text was updated successfully, but these errors were encountered: