adept-jpg-compressor icon indicating copy to clipboard operation
adept-jpg-compressor copied to clipboard

Add exit code checking to functions without return values

Open technopagan opened this issue 10 years ago • 0 comments

Currenty, the functions calling upon ImageMagick commands assume that everything goes well within these commands. There is no return value we can unit-test easily.

What we should implement is checking for the exit state of each command and see if they are all Null (OK) and alternatively, abort execution as soon as one of them returns anything else but Null.

Of course, even when aborting, we will still be running cleanup in order not to leave any temporary files behind and we should use the opportunity to provide the user with helpful debugging information (Anything is better than some NonNull-error code!).

technopagan avatar Mar 01 '14 15:03 technopagan