Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::Exception Class Reference

Base class of all ogdf exceptions. More...

#include <ogdf/basic/exceptions.h>

+ Inheritance diagram for ogdf::Exception:

Public Member Functions

 Exception (const char *file=nullptr, int line=-1)
 Constructs an exception. More...
 
const char * file () const
 Returns the name of the source file where exception was thrown. More...
 
int line () const
 Returns the line number where the exception was thrown. More...
 
const char * what () const noexcept override
 

Private Attributes

const char * m_file
 Source file where exception occurred. More...
 
int m_line
 Line number where exception occurred. More...
 

Detailed Description

Base class of all ogdf exceptions.

Definition at line 166 of file exceptions.h.

Constructor & Destructor Documentation

◆ Exception()

ogdf::Exception::Exception ( const char *  file = nullptr,
int  line = -1 
)
inlineexplicit

Constructs an exception.

Parameters
fileis the name of the source file where exception was thrown.
lineis the line number in the source file where the exception was thrown.

Definition at line 177 of file exceptions.h.

Member Function Documentation

◆ file()

const char* ogdf::Exception::file ( ) const
inline

Returns the name of the source file where exception was thrown.

Returns a null pointer if the name of the source file is unknown.

Definition at line 183 of file exceptions.h.

◆ line()

int ogdf::Exception::line ( ) const
inline

Returns the line number where the exception was thrown.

Returns -1 if the line number is unknown.

Definition at line 189 of file exceptions.h.

◆ what()

const char* ogdf::Exception::what ( ) const
inlineoverridenoexcept

Definition at line 191 of file exceptions.h.

Member Data Documentation

◆ m_file

const char* ogdf::Exception::m_file
private

Source file where exception occurred.

Definition at line 168 of file exceptions.h.

◆ m_line

int ogdf::Exception::m_line
private

Line number where exception occurred.

Definition at line 169 of file exceptions.h.


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