summaryrefslogtreecommitdiff
path: root/gcc/d/dmd/errors.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/dmd/errors.d')
-rw-r--r--gcc/d/dmd/errors.d16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/d/dmd/errors.d b/gcc/d/dmd/errors.d
index 114bd44e32c..62e86a1163c 100644
--- a/gcc/d/dmd/errors.d
+++ b/gcc/d/dmd/errors.d
@@ -434,8 +434,20 @@ else
pragma(printf) extern (C++) void vdeprecationSupplemental(const ref Loc loc, const(char)* format, va_list ap);
/**
- * Call this after printing out fatal error messages to clean up and exit
- * the compiler.
+ * The type of the fatal error handler
+ * Returns: true if error handling is done, false to do exit(EXIT_FAILURE)
+ */
+alias FatalErrorHandler = bool delegate();
+
+/**
+ * The fatal error handler.
+ * If non-null it will be called for every fatal() call issued by the compiler.
+ */
+__gshared FatalErrorHandler fatalErrorHandler;
+
+/**
+ * Call this after printing out fatal error messages to clean up and exit the
+ * compiler. You can also set a fatalErrorHandler to override this behaviour.
*/
extern (C++) void fatal();