NIST Fingerprint Image Quality 2
Fingerprint image quality assessment tool
Public Member Functions | Static Public Member Functions | List of all members
NFIQ2::Exception Class Reference

Exceptions thrown from NFIQ2 functions. More...

#include <nfiq2_exception.hpp>

Inherits std::exception.

Public Member Functions

 Exception (const NFIQ2::ErrorCode errorCode)
 Constructor that supplies a default error description. More...
 
 Exception (const NFIQ2::ErrorCode errorCode, const std::string &errorMessage)
 Constructor that relies on a developer-provided error description. More...
 
virtual ~Exception () noexcept
 Destructor. More...
 
virtual const char * what () const noexcept override
 Extracts thrown exception error message string. More...
 
NFIQ2::ErrorCode getErrorCode () const
 Obtain the code that broadly describes the type of error. More...
 
std::string getErrorMessage () const
 Obtain a description of what happened. More...
 

Static Public Member Functions

static std::string defaultErrorMessage (const NFIQ2::ErrorCode errorCode)
 Obtain a default error message for a given ErrorCode. More...
 

Detailed Description

Exceptions thrown from NFIQ2 functions.

Definition at line 39 of file nfiq2_exception.hpp.

Constructor & Destructor Documentation

◆ Exception() [1/2]

NFIQ2::Exception::Exception ( const NFIQ2::ErrorCode  errorCode)

Constructor that supplies a default error description.

Parameters
errorCodeCode that broadly describes the type of error.

◆ Exception() [2/2]

NFIQ2::Exception::Exception ( const NFIQ2::ErrorCode  errorCode,
const std::string &  errorMessage 
)

Constructor that relies on a developer-provided error description.

Parameters
errorCodeCode that broadly describes the type of error.
errorMessageDescription of what happened.

◆ ~Exception()

virtual NFIQ2::Exception::~Exception ( )
virtualnoexcept

Destructor.

Member Function Documentation

◆ what()

virtual const char * NFIQ2::Exception::what ( ) const
overridevirtualnoexcept

Extracts thrown exception error message string.

Returns
The exception message.

◆ getErrorCode()

NFIQ2::ErrorCode NFIQ2::Exception::getErrorCode ( ) const

Obtain the code that broadly describes the type of error.

Returns
Code that broadly describes the type of error.

◆ getErrorMessage()

std::string NFIQ2::Exception::getErrorMessage ( ) const

Obtain a description of what happened.

Returns
Description of what happened.

◆ defaultErrorMessage()

static std::string NFIQ2::Exception::defaultErrorMessage ( const NFIQ2::ErrorCode  errorCode)
static

Obtain a default error message for a given ErrorCode.

Parameters
errorCodeError code from ErrorCode
Returns
String containing default description of errorCode.

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