You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case of some errors (an example of an error where this occurs is reported in #48), PSXPackager will write an empty (or almost empty) file and fail silently (exit code 0, which ordinarily indicates success). As a result, automated scripts cannot easily detect these failures and will assume that the output file is valid. For destructive scripts, i.e. scripts that delete the original files once conversion is complete, this will cause loss of data.
Ideally, the program should not return an exit code of 0 if the conversion was unsuccessful, and should also clean up after itself in such cases to prevent empty files from being misinterpreted as successful conversions.
So I found out that in linux the number returned is an unsigned int from 0-255, so the above gets returned as 0, 255, 254. I read that error values shoul be 0-125, as the MSB is used by the system. This is of course up to us, but what would you prefer or what is recommended or makes more sense?
In the case of some errors (an example of an error where this occurs is reported in #48), PSXPackager will write an empty (or almost empty) file and fail silently (exit code 0, which ordinarily indicates success). As a result, automated scripts cannot easily detect these failures and will assume that the output file is valid. For destructive scripts, i.e. scripts that delete the original files once conversion is complete, this will cause loss of data.
Ideally, the program should not return an exit code of 0 if the conversion was unsuccessful, and should also clean up after itself in such cases to prevent empty files from being misinterpreted as successful conversions.
Steps:
echo $?
Expected results:
Conversion is unsuccessful.
echo $?
returns a non-zero value, indicating failure. No PBP file is produced.Actual results:
Conversion is unsuccessful.
echo $?
returns 0, indicating success. A small PBP file containing no ROM data is produced.The text was updated successfully, but these errors were encountered: