diff --git a/src/debug.h b/src/debug.h
index 9684aa2dff50e2d44f31ca9126e140b5eb7500d0..2ccbe58bac9670f86d005d3ef24145b3e8553e1e 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -42,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #endif
 
 // Whether to catch all std::exceptions.
-// Assert will be called on such an event.
+// When "catching", the program will abort with an error message.
 // In debug mode, leave these for the debugger and don't catch them.
 #ifdef NDEBUG
 	#define CATCH_UNHANDLED_EXCEPTIONS 1
@@ -145,11 +145,11 @@ class DebugStacker
 
 #if CATCH_UNHANDLED_EXCEPTIONS == 1
 	#define BEGIN_DEBUG_EXCEPTION_HANDLER try {
-	#define END_DEBUG_EXCEPTION_HANDLER(logstream) \
-		} catch (std::exception &e) {                               \
-			logstream << "ERROR: An unhandled exception occurred: " \
-				<< e.what() << std::endl;                           \
-			assert(0);                                              \
+	#define END_DEBUG_EXCEPTION_HANDLER(logstream)           \
+		} catch (std::exception &e) {                        \
+			logstream << "An unhandled exception occurred: " \
+				<< e.what() << std::endl;                    \
+			FATAL_ERROR(e.what());                           \
 		}
 #else
 	// Dummy ones