Inflection
Morphology Inflection
Loading...
Searching...
No Matches
Public Member Functions | List of all members
inflection::exception::Exception Class Reference

Base exception class for all exceptions in Inflection. More...

#include <Exception.hpp>

+ Inheritance diagram for inflection::exception::Exception:

Public Member Functions

 Exception ()
 
 Exception (const std::u16string &message)
 
 ~Exception () override
 
- Public Member Functions inherited from inflection::exception::Throwable
 Throwable ()
 
 Throwable (const std::u16string &message)
 
 ~Throwable () override
 
const char * what () const noexcept override
 
virtual const ::std::u16string & getMessage () const noexcept
 

Detailed Description

Base exception class for all exceptions in Inflection.

This class defines exceptions in Inflection. It provides similar syntax and semantics to Java's exceptions (although restricted by the limitations of C++), and provides two basic methods to be overridden by subclassing. It is preferable to pass in a message explaining the cause of the exception, although many subclasses may add their own messages to the passed in message.

Since all Exceptions in Inflection inherit from std::exception you may simply throw the exception like so: throw inflection::exception::Exception(u"Uh oh spaghettio");

Definition at line 19 of file Exception.hpp.

Constructor & Destructor Documentation

◆ Exception() [1/2]

inflection::exception::Exception::Exception ( )

Creates a new Exception.

◆ Exception() [2/2]

inflection::exception::Exception::Exception ( const std::u16string &  message)
explicit

Creates a new Exception with a message to be printed with the exception.

Parameters
messageThe message to be added to the exception.

◆ ~Exception()

inflection::exception::Exception::~Exception ( )
override

Destructor


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