aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/util/errors.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/cpp/util/errors.cc')
-rw-r--r--src/main/cpp/util/errors.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/cpp/util/errors.cc b/src/main/cpp/util/errors.cc
index 49248a15fc..8497545e0b 100644
--- a/src/main/cpp/util/errors.cc
+++ b/src/main/cpp/util/errors.cc
@@ -41,4 +41,13 @@ void pdie(const int exit_status, const char *format, ...) {
exit(exit_status);
}
+void PrintError(const char *format, ...) {
+ fprintf(stderr, "Error: ");
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ fprintf(stderr, ": %s\n", strerror(errno));
+}
+
} // namespace blaze_util