#include <error.hxx>

Public Member Functions

 ~Error ()
 

Static Public Member Functions

static Ostream & Build (Ostream &os, const String &file, int line, const String &message)
 
static Writer & Build (Writer &writer, const String &file, int line, const String &message)
 

Private Member Functions

 Error (Ostream &os)
 
Error operator= (Error &)
 
bool Write (const String &file, int line, const String &message)
 

Static Private Member Functions

static bool Write (Writer &writer, const String &file, int line, const String &message)
 

Private Attributes

std::unique_ptr< Stream > stream
 
std::unique_ptr< Writer > writer
 

Detailed Description

parameter.

Definition at line 30 of file error.hxx.

Constructor & Destructor Documentation

SHA_Logger::Error::~Error ( )
inline

Definition at line 34 of file error.hxx.

34 { assert(this->writer->IsComplete()); }
std::unique_ptr< Writer > writer
Definition: error.hxx:85
SHA_Logger::Error::Error ( Ostream &  os)
inlineprivate

Definition at line 61 of file error.hxx.

61  : stream(std::unique_ptr<Stream>(new Stream(os))),
62  writer(std::unique_ptr<Writer>(new Writer(*this->stream))) {}
std::unique_ptr< Writer > writer
Definition: error.hxx:85
std::unique_ptr< Stream > stream
Definition: error.hxx:84
rapidjson::OStreamWrapper Stream
Definition: typedef.hxx:32
rapidjson::PrettyWriter< Stream > Writer
Definition: typedef.hxx:33

Member Function Documentation

static Ostream& SHA_Logger::Error::Build ( Ostream &  os,
const String &  file,
int  line,
const String &  message 
)
inlinestatic

Instantiate a new json writer using the stream passed as argument and write value information.

Returns
stream reference filled up with Error object information, error information in case of failure.

Definition at line 41 of file error.hxx.

42  {
43  std::unique_ptr<Error> builder = std::unique_ptr<Error>(new Error(os));
44  builder->Write(file, line, message);
45 
46  return os;
47  }
Error(Ostream &os)
Definition: error.hxx:61
static Writer& SHA_Logger::Error::Build ( Writer &  writer,
const String &  file,
int  line,
const String &  message 
)
inlinestatic

Use json writer passed as parameter to write iterator information.

Returns
stream reference filled up with Error object information, error information in case of failure.

Definition at line 53 of file error.hxx.

54  {
55  Write(writer, file, line, message);
56 
57  return writer;
58  }
std::unique_ptr< Writer > writer
Definition: error.hxx:85
bool Write(const String &file, int line, const String &message)
Definition: error.hxx:65
Error SHA_Logger::Error::operator= ( Error &  )
inlineprivate

Definition at line 63 of file error.hxx.

63 {} // Not Implemented
bool SHA_Logger::Error::Write ( const String &  file,
int  line,
const String &  message 
)
inlineprivate

Definition at line 65 of file error.hxx.

66  { return Write(*this->writer, file, line, message); }
std::unique_ptr< Writer > writer
Definition: error.hxx:85
bool Write(const String &file, int line, const String &message)
Definition: error.hxx:65
static bool SHA_Logger::Error::Write ( Writer &  writer,
const String &  file,
int  line,
const String &  message 
)
inlinestaticprivate

Definition at line 68 of file error.hxx.

69  {
70  writer.StartObject();
71  writer.Key("type");
72  writer.String("error");
73  writer.Key("file");
74  writer.String(file);
75  writer.Key("line");
76  writer.Int(line);
77  writer.Key("message");
78  writer.String("Error: " + message);
79  writer.EndObject();
80 
81  return true;
82  }
std::unique_ptr< Writer > writer
Definition: error.hxx:85

Member Data Documentation

std::unique_ptr<Stream> SHA_Logger::Error::stream
private

Definition at line 84 of file error.hxx.

std::unique_ptr<Writer> SHA_Logger::Error::writer
private

Definition at line 85 of file error.hxx.


The documentation for this class was generated from the following file: