Handle recoverable errors as terminating errors

Currently recoverable errors are handled in a way that means they don't cause the operation of the script to terminate, but the execution continues in spite of the error. This change makes it so a recoverable error is seen as a terminating error