Change the exit code of exception to -1.