MobyGamer / total-dos-launcher

A system for easily loading and running thousands of DOS programs on vintage hardware
MIT License
109 stars 10 forks source link

Handler extraction return codes are discarded #13

Closed MobyGamer closed 6 years ago

MobyGamer commented 7 years ago

TDL currently doesn't attempt to catch a return code from extraction handlers. It should grab the code and do something with it, like notify the user... something.

MobyGamer commented 7 years ago

All result codes are now captured, but since every executable has different result codes, there's no way to handle what they are without cataloging the result codes of several popular utilities (pkunzip, etc.). This is low priority and can be a new issue if someone in the future cares.

However, I noticed that SPAWNO codes could be handled because we know what they are, so I'll add those and then close this issue.

MobyGamer commented 7 years ago

A non-zero exit code should not fatal error abort TDL. It should be presented to the user and told that there was an error. This was witnessed when a signature/envelope failure occured: EXEC failure; Error code = 1

A good way of handling this is to extend handlers.ini to include error/exit code handling. Then, a meaningful text message of what the error means can be displayed to the user. However, that's not going to work if spawno doesn't pass along the code.

MobyGamer commented 6 years ago

Going to close this one as "good enough" -- result codes are indeed passed to the user and also logged. I don't think there is any benefit in coming up with an error result code database to handle custom exit codes (audience for this entire project is already small enough ;-) .