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

Used to indicate an error utilizing the ICU unicode library. More...

#include <ICUException.hpp>

+ Inheritance diagram for inflection::exception::ICUException:

Public Member Functions

 ICUException (UErrorCode status)
 
 ICUException (UErrorCode status, const std::u16string &message)
 
 ~ICUException () override
 
UErrorCode getError () const
 
- 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
 

Static Public Member Functions

static void throwOnFailure (UErrorCode status)
 
static void throwOnFailure (UErrorCode status, const char16_t *message)
 
static void throwOnFailure (UErrorCode status, const std::u16string &message)
 

Detailed Description

Used to indicate an error utilizing the ICU unicode library.

This type of exception is typically thrown when encoding, decoding, or doing character set conversion while utilizing the underlying ICU library.

Definition at line 15 of file ICUException.hpp.

Constructor & Destructor Documentation

◆ ICUException() [1/2]

inflection::exception::ICUException::ICUException ( UErrorCode  status)
explicit

Construct an exception for the provided UErrorCode.

◆ ICUException() [2/2]

inflection::exception::ICUException::ICUException ( UErrorCode  status,
const std::u16string &  message 
)

Construct an exception with an informative message for debugging purposes for the provided UErrorCode.

◆ ~ICUException()

inflection::exception::ICUException::~ICUException ( )
override

Destructor

Member Function Documentation

◆ getError()

UErrorCode inflection::exception::ICUException::getError ( ) const

Return the original UErrorCode.

◆ throwOnFailure() [1/3]

void inflection::exception::ICUException::throwOnFailure ( UErrorCode  status)
inlinestatic

Throw an exception when the UErrorCode is a failure.

Parameters
statusThe UErrorCode to check

Definition at line 66 of file ICUException.hpp.

◆ throwOnFailure() [2/3]

void inflection::exception::ICUException::throwOnFailure ( UErrorCode  status,
const char16_t *  message 
)
inlinestatic

Throw an exception when the UErrorCode is a failure.

Parameters
statusThe UErrorCode to check
messageThe additional message to return to aid in diagnosing the failure.

Definition at line 75 of file ICUException.hpp.

◆ throwOnFailure() [3/3]

void inflection::exception::ICUException::throwOnFailure ( UErrorCode  status,
const std::u16string &  message 
)
inlinestatic

Throw an exception when the UErrorCode is a failure.

Parameters
statusThe UErrorCode to check
messageThe additional message to return to aid in diagnosing the failure.

Definition at line 84 of file ICUException.hpp.


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