summaryrefslogtreecommitdiffstats
path: root/chrome/common/bzip2_error_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/bzip2_error_handler.cc')
-rw-r--r--chrome/common/bzip2_error_handler.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/common/bzip2_error_handler.cc b/chrome/common/bzip2_error_handler.cc
new file mode 100644
index 0000000..e66bcf3
--- /dev/null
+++ b/chrome/common/bzip2_error_handler.cc
@@ -0,0 +1,14 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <ostream>
+
+#include "base/logging.h"
+
+// We define BZ_NO_STDIO in third_party/bzip2 to remove its internal STDERR
+// error reporting. This requires us to export our own error handler.
+extern "C"
+void bz_internal_error(int errcode) {
+ LOG(FATAL) << "bzip2 internal error: " << errcode;
+}