aboutsummaryrefslogtreecommitdiff
path: root/bpkg/diagnostics.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-22 12:09:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-22 12:09:27 +0200
commit8749eeea8723196fa38a9eb7917775cfe8b87ad7 (patch)
treeb9c3fb8f82ce2227f98d9ee40740906e8d4ab235 /bpkg/diagnostics.cxx
parentaea4e5401af4e28a32d99e0e3c2ecd42888c2ba4 (diff)
Use diagnostics facility from libbutl
Diffstat (limited to 'bpkg/diagnostics.cxx')
-rw-r--r--bpkg/diagnostics.cxx32
1 files changed, 5 insertions, 27 deletions
diff --git a/bpkg/diagnostics.cxx b/bpkg/diagnostics.cxx
index 9d1f96d..82ebb8c 100644
--- a/bpkg/diagnostics.cxx
+++ b/bpkg/diagnostics.cxx
@@ -48,29 +48,6 @@ namespace bpkg
//
uint16_t verb;
- // Diagnostic facility, base infrastructure.
- //
- ostream* diag_stream = &cerr;
-
- diag_record::
- ~diag_record () noexcept(false)
- {
- // Don't flush the record if this destructor was called as part of
- // the stack unwinding. Right now this means we cannot use this
- // mechanism in destructors, which is not a big deal, except for
- // one place: exception_guard. So for now we are going to have
- // this ugly special check which we will be able to get rid of
- // once C++17 uncaught_exceptions() becomes available.
- //
- if (!empty_ && (!uncaught_exception () || exception_unwinding_dtor))
- {
- *diag_stream << os_.str () << endl;
-
- if (epilogue_ != nullptr)
- epilogue_ (*this); // Can throw.
- }
- }
-
// Diagnostic facility, project specifics.
//
@@ -120,8 +97,9 @@ namespace bpkg
}
const basic_mark error ("error");
- const basic_mark warn ("warning");
- const basic_mark info ("info");
- const basic_mark text (nullptr);
- const fail_mark<failed> fail;
+ const basic_mark warn ("warning");
+ const basic_mark info ("info");
+ const basic_mark text (nullptr);
+ const fail_mark fail ("error");
+ const fail_end endf;
}