sptk2 logo
SPTK Home Page
Public Member Functions | List of all members
sptk::Exception Class Reference

SPTK generic exception class. More...

#include <Exception.h>

Inheritance diagram for sptk::Exception:
sptk::ConnectionException sptk::DatabaseException sptk::HTTPException sptk::SOAPException sptk::SystemException sptk::TimeoutException

Public Member Functions

 Exception (const String &text, const fs::path &file=std::string(), int line=0, const String &description=String()) DOESNT_THROW
 Constructor. More...
 
const char * what () const DOESNT_THROW override
 Returns complete text of exception.
 
String message () const
 Returns exception message without file name, line number, or description.
 
String file () const
 Returns exception file name.
 
int line () const
 Returns exception line number.
 
String description () const
 Returns exception description.
 

Detailed Description

SPTK generic exception class.

Contains information about what happened and where. It's based on std::exception, so if you just want to catch STL and SPTK exceptions - you can use try {} catch (std::exception& e) {} block.

Constructor & Destructor Documentation

◆ Exception()

sptk::Exception::Exception ( const String text,
const fs::path &  file = std::string(),
int  line = 0,
const String description = String() 
)
explicit

Constructor.

Parameters
textThe exception text
fileThe file where exception occurs
lineThe line number in the file where exception occurs
descriptionThe optional description information

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

Fri Oct 14 2022 09:58:42: SPTK 5.4.1