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.cc24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/main/cpp/util/errors.cc b/src/main/cpp/util/errors.cc
index 4fc6190e98..b337809325 100644
--- a/src/main/cpp/util/errors.cc
+++ b/src/main/cpp/util/errors.cc
@@ -19,8 +19,11 @@
#include <stdlib.h>
#include <string.h>
+#include "src/main/cpp/util/logging.h"
+
namespace blaze_util {
+// TODO(b/32967056) This should be a FATAL log statement
void die(const int exit_status, const char *format, ...) {
va_list ap;
va_start(ap, format);
@@ -30,6 +33,7 @@ void die(const int exit_status, const char *format, ...) {
exit(exit_status);
}
+// TODO(b/32967056) This should be a FATAL log statement
void pdie(const int exit_status, const char *format, ...) {
const char *errormsg = GetLastErrorString().c_str();
fprintf(stderr, "Error: ");
@@ -41,24 +45,4 @@ void pdie(const int exit_status, const char *format, ...) {
exit(exit_status);
}
-void PrintError(const char *format, ...) {
- const char *errormsg = GetLastErrorString().c_str();
- fprintf(stderr, "ERROR: ");
- va_list ap;
- va_start(ap, format);
- vfprintf(stderr, format, ap);
- va_end(ap);
- fprintf(stderr, ": %s\n", errormsg);
-}
-
-void PrintWarning(const char *format, ...) {
- va_list args;
-
- va_start(args, format);
- fputs("WARNING: ", stderr);
- vfprintf(stderr, format, args);
- fputc('\n', stderr);
- va_end(args);
-}
-
} // namespace blaze_util