halt_on_error is ignored in the modedev
Fix for previous commit
Script exits with code 1 if ApplicationError is thrown