summaryrefslogtreecommitdiff
path: root/includes/RtsMessages.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-08-30 14:02:52 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-08-30 14:02:52 +0000
commitab1e183aa7801f9260a9cbb6edbd553cf8249b25 (patch)
tree7245d178055f0f05ce45c74d8eca56eea49af2b2 /includes/RtsMessages.h
parentee4d9a57ab125607e3029a8c1d052114956811f5 (diff)
downloadhaskell-ab1e183aa7801f9260a9cbb6edbd553cf8249b25.tar.gz
add sysErrorBelch() for reporting system call errors
Diffstat (limited to 'includes/RtsMessages.h')
-rw-r--r--includes/RtsMessages.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/includes/RtsMessages.h b/includes/RtsMessages.h
index 63f3ea80c6..79c48d3b98 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 */