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

Used to indicate a resource that is required by Inflection is missing. More...

#include <MissingResourceException.hpp>

+ Inheritance diagram for inflection::exception::MissingResourceException:

Public Member Functions

 MissingResourceException (const std::u16string &message, const std::u16string &className, const std::u16string &key)
 
 ~MissingResourceException () override
 
virtual const ::std::u16string & getClassName () const noexcept
 
virtual const ::std::u16string & getKey () const noexcept
 
- Public Member Functions inherited from inflection::exception::RuntimeException
 RuntimeException ()
 
 RuntimeException (const std::u16string &message)
 
 ~RuntimeException () override
 
- Public Member Functions inherited from inflection::exception::Exception
 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

Used to indicate a resource that is required by Inflection is missing.

This is typically thrown by factories when constructing rules for inflection or tokenization. One such language that can throw this is Hebrew.

This exception type is meant to be used with inflection::resources::DataResource. And indicates the absence of a specific key in a resource file.

Definition at line 17 of file MissingResourceException.hpp.

Constructor & Destructor Documentation

◆ MissingResourceException()

inflection::exception::MissingResourceException::MissingResourceException ( const std::u16string &  message,
const std::u16string &  className,
const std::u16string &  key 
)

Constructor.

Parameters
messageThe message to add to the exception.
classNameThe class name of the object throwing this exception.
keyThe key being looked up by inflection::resources::DataResource::getString().

◆ ~MissingResourceException()

inflection::exception::MissingResourceException::~MissingResourceException ( )
override

Destructor

Member Function Documentation

◆ getClassName()

virtual const ::std::u16string & inflection::exception::MissingResourceException::getClassName ( ) const
virtualnoexcept

Returns the class name of the object that threw this exception.

Returns
The class name of the object that threw this exception.

◆ getKey()

virtual const ::std::u16string & inflection::exception::MissingResourceException::getKey ( ) const
virtualnoexcept

Returns the name of the key used during inflection::resources::DataResource::getString() lookup.

Returns
The name of the key.

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