X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=includes%2FRtsMessages.h;h=79c48d3b98ad71395d5da7d865a50ca14485c924;hp=63f3ea80c662fa2449e8bb29acc9a7918b8dc71b;hb=9da4639011348fb6c318e3cba4b08622f811d9c4;hpb=f07c4a158ebd4e7270266fe04077ea3c931f0672 diff --git a/includes/RtsMessages.h b/includes/RtsMessages.h index 63f3ea8..79c48d3 100644 --- a/includes/RtsMessages.h +++ b/includes/RtsMessages.h @@ -47,6 +47,20 @@ extern void errorBelch(const char *s, ...) extern void verrorBelch(const char *s, va_list ap); /* + * An error condition which is caused by and/or can be corrected by + * the user, and which has an associated error condition reported + * by the system (in errno on Unix, and GetLastError() on Windows). + * The system error message is appended to the message generated + * from the supplied format string. + * + * sysErrorBelch() invokes (*sysErrorMsgFn)(). + */ +extern void sysErrorBelch(const char *s, ...) + GNUC3_ATTRIBUTE(format (printf, 1, 2)); + +extern void vsysErrorBelch(const char *s, va_list ap); + +/* * A debugging message. Debugging messages are generated either as a * virtue of having DEBUG turned on, or by being explicitly selected * via RTS options (eg. +RTS -Ds). @@ -72,5 +86,6 @@ extern RtsMsgFunction *errorMsgFn; extern RtsMsgFunction rtsFatalInternalErrorFn; extern RtsMsgFunction rtsDebugMsgFn; extern RtsMsgFunction rtsErrorMsgFn; +extern RtsMsgFunction rtsSysErrorMsgFn; #endif /* RTSMESSAGES_H */