Classes | |
class | ColoredString |
Class for printing colored text to a terminal. More... | |
class | Throwable |
Base class for all exception types in libthrowable. More... | |
class | ThrowableType |
Use this template to derive new throwable classes within seconds. More... | |
class | TracePoint |
A class that can be very useful for finding bugs. More... | |
class | UserFault |
This class describes an Exception object directly aimed at the enduser. More... | |
class | UserFaultType |
Derive new UserFaultTypes within seconds. More... | |
Namespaces | |
namespace | util |
Utilities, mostly, but not only, for internal use. | |
Typedefs | |
typedef ThrowableType < Throwable, tags::ErrorTag > | Error |
This type and derived classes should represent fatal program errors. | |
typedef ThrowableType < Throwable, tags::ExceptionTag > | Exception |
This type and derived classes should represent recoverable errors. | |
typedef ThrowableType< Problem, tags::FailedAssertionTag > | FailedAssertion |
This type represents a failed assertion. | |
typedef ThrowableType < Throwable, tags::ProblemTag > | Problem |
This type and derived classes should represent possible recoverable errors. | |
Functions | |
void | init (const std::ostream *p_cout=&std::cout, const std::ostream *p_cerr=&std::cerr) throw () |
Informs the library about std::cout and std::cerr as you see them - or about your own equivalent objects. | |
void | registerAsStreamsToStdout (const std::vector< const std::ostream * > &streams, bool append=true) throw () |
Informs the library that the given streams write to stdout. | |
void | registerAsStreamToStdout (const std::ostream *stream, bool append=true) throw () |
Convenience function. | |
void | registerAsStreamsToStderr (const std::vector< const std::ostream * > &streams, bool append=true) throw () |
Informs the library that the given streams write to stderr. | |
void | registerAsStreamToSterr (const std::ostream *stream, bool append=true) throw () |
Convenience function. | |
std::ostream & | operator<< (std::ostream &os, const Throwable &throwable) |
Writes throwable.toString() to os. | |
std::ostream & | operator<< (std::ostream &os, const UserFault &uf) |
Variables | |
const unsigned | c_white = 0 |
White, sometimes grey without c_intensity. | |
const unsigned | c_black = 1 |
Black. | |
const unsigned | c_yellow = 2 |
Yellow, sometimes orange or brown without c_intensity. | |
const unsigned | c_red = 3 |
Red. | |
const unsigned | c_magenta = 4 |
Magenta. | |
const unsigned | c_blue = 5 |
Blue. | |
const unsigned | c_cyan = 6 |
Cyan. | |
const unsigned | c_green = 7 |
Green. | |
const unsigned | c_nochange = 8 |
Passing this value will preserve the previous color settings. | |
const unsigned | c_intensity = 128 |
Not a real color, but can be ORed together with another color to add intensity and/or make the text appear bold. |
typedef ThrowableType<Throwable, tags::ExceptionTag> libthrowable::Exception |
This type and derived classes should represent recoverable errors.
typedef ThrowableType<Problem, tags::FailedAssertionTag> libthrowable::FailedAssertion |
This type represents a failed assertion.
std::ostream& libthrowable::operator<< | ( | std::ostream & | os, | |
const UserFault & | uf | |||
) |