From de91921561092689369b56c54950474e0a86e66f Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 15 Oct 2018 21:08:04 +0300 Subject: Add implementation --- openssl/diagnostics.cxx | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 openssl/diagnostics.cxx (limited to 'openssl/diagnostics.cxx') diff --git a/openssl/diagnostics.cxx b/openssl/diagnostics.cxx new file mode 100644 index 0000000..4dd13e0 --- /dev/null +++ b/openssl/diagnostics.cxx @@ -0,0 +1,35 @@ +// file : openssl/diagnostics.cxx -*- C++ -*- +// copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#include + +namespace openssl +{ + // Diagnostic facility, project specifics. + // + + void simple_prologue_base:: + operator() (const diag_record& r) const + { + if (type_ != nullptr) + r << type_; + + if (name_ != nullptr) + r << name_; + + if (data_ != nullptr) + r << '(' << data_ << ')'; + + if (name_ != nullptr || data_ != nullptr) + r << ": "; + } + + basic_mark error ("error: "); + basic_mark warn ("warning: "); + basic_mark info ("info: "); + basic_mark text (nullptr); + fail_mark fail ("error: "); + + const fail_end endf; +} -- cgit v1.1