CookMem 1.4.0
A C++ memory context / allocator
Loading...
Searching...
No Matches
cookmem::Exception Class Reference

#include <exception.h>

Public Member Functions

 Exception (MemError_et error, const char *msg, const char *file=nullptr, int line=0)
 
MemError_et getError () const
 
const char * getMessage () const
 
const char * getFile () const
 
int getLine () const
 

Detailed Description

A simple memory related exception.

Constructor & Destructor Documentation

◆ Exception()

cookmem::Exception::Exception ( MemError_et  error,
const char *  msg,
const char *  file = nullptr,
int  line = 0 
)
inline

Constructor.

Parameters
errorthe type of the error.
msgthe message associated with this exception.
filethe source file where the error was detected.
linethe line number where the error was detected.

Member Function Documentation

◆ getError()

MemError_et cookmem::Exception::getError ( ) const
inline

Get the exception error.

Returns
the exception error.

◆ getFile()

const char * cookmem::Exception::getFile ( ) const
inline

Get the file where the exception got thrown.

Returns
the file where the exception got thrown.

◆ getLine()

int cookmem::Exception::getLine ( ) const
inline

Get the line number of where the exception got thrown.

Returns
the line number of where the exception got thrown.

◆ getMessage()

const char * cookmem::Exception::getMessage ( ) const
inline

Get the exception message.

Returns
the exception message.

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