Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::Exception Class Reference

Exception class. More...

#include <Exception.h>

Inheritance diagram for sese::Exception:
sese::UnixException

Public Member Functions

 Exception (std::string message)
 
 ~Exception () override
 
void printStacktrace ()
 Print stack traces to stdout.
 
void printStacktrace (sese::record::Logger *logger)
 
void printStacktrace (sese::io::OutputStream *output)
 
const char * what () const noexcept override
 Get the text information of the exception.
 
std::string message () const noexcept
 Get the text information of the exception.
 
- Public Member Functions inherited from sese::UnixException
 UnixException (const char *message)
 
const char * what () const noexcept override
 

Static Public Attributes

static uint16_t offset = 2
 

Protected Member Functions

virtual std::string buildStacktrace ()
 

Protected Attributes

std::string * message_
 
system::StackInfostackInfo {}
 

Detailed Description

Exception class.

Constructor & Destructor Documentation

◆ Exception()

sese::Exception::Exception ( std::string message)
explicit

References message(), message_, offset, and stackInfo.

◆ ~Exception()

sese::Exception::~Exception ( )
override

Member Function Documentation

◆ buildStacktrace()

std::string sese::Exception::buildStacktrace ( )
protectedvirtual

◆ message()

std::string sese::Exception::message ( ) const
nodiscardnoexcept

Get the text information of the exception.

Returns
Text information of the exception

Referenced by Exception().

◆ printStacktrace() [1/3]

void sese::Exception::printStacktrace ( )

Print stack traces to stdout.

◆ printStacktrace() [2/3]

void sese::Exception::printStacktrace ( sese::io::OutputStream * output)

Print stack trace to output stream

Parameters
outputOutput stream

References sese::io::OutputStream::write().

◆ printStacktrace() [3/3]

void sese::Exception::printStacktrace ( sese::record::Logger * logger)

Print stack trace to logger

Parameters
loggerLogger

References sese::record::Logger::dump().

◆ what()

const char * sese::Exception::what ( ) const
nodiscardoverridenoexcept

Get the text information of the exception.

Returns
Text information of the exception

Member Data Documentation

◆ message_

std::string* sese::Exception::message_
protected

Referenced by Exception().

◆ offset

uint16_t sese::Exception::offset = 2
static

Referenced by Exception().

◆ stackInfo

system::StackInfo* sese::Exception::stackInfo {}
protected

Referenced by Exception().


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