Rethrow error instead of exiting the script if an error is catched