Nail to Nail Fingerprint Capture Challenge
API for participant-specific one-to-many template generation and template matching.
be_error_exception.h
1/******************************************************************************
2* This software was developed at the National Institute of Standards and
3* Technology (NIST) by employees of the Federal Government in the course
4* of their official duties. Pursuant to title 17 Section 105 of the
5* United States Code, this software is not subject to copyright protection
6* and is in the public domain. NIST assumes no responsibility whatsoever for
7* its use by other parties, and makes no guarantees, expressed or implied,
8* about its quality, reliability, or any other characteristic.
9******************************************************************************/
10#ifndef __BE_EXCEPTION_H__
11#define __BE_EXCEPTION_H__
12
13#include <string>
14
15/*
16 * Define the exception classes that will be used throughout the framework.
17 */
18namespace BiometricEvaluation {
19
20 namespace Error {
21
31 class Exception : std::exception {
32 public:
39
48 /*
49 * Pass info by value so we can use move
50 * semantics when setting object state.
51 */
52 Exception(std::string info);
53
54 virtual ~Exception() = default;
55
63 const char *
64 what() const noexcept;
65
73 const std::string
74 whatString() const noexcept;
75
76 private:
77 std::string _info;
78 };
79
84 class FileError : public Exception {
85 public:
91
97 FileError(const std::string &info);
98 };
99
104 class ParameterError : public Exception {
105 public:
111
117 ParameterError(const std::string &info);
118 };
119
125 class ConversionError : public Exception {
126 public:
132
138 ConversionError(const std::string &info);
139 };
140
149 class DataError : public Exception {
150 public:
156
162 DataError(const std::string &info);
163 };
164
169 class MemoryError : public Exception {
170 public:
176
182 MemoryError(const std::string &info);
183 };
184
189 class ObjectExists : public Exception {
190 public:
196
202 ObjectExists(const std::string &info);
203 };
204
210 public:
216
222 ObjectDoesNotExist(const std::string &info);
223 };
224
229 class ObjectIsOpen : public Exception {
230 public:
236
242 ObjectIsOpen(const std::string &info);
243 };
244
249 class ObjectIsClosed : public Exception {
250 public:
256
262 ObjectIsClosed(const std::string &info);
263 };
264
270 class StrategyError : public Exception {
271 public:
277
283 StrategyError(const std::string &info);
284 };
285
292 class NotImplemented : public Exception {
293 public:
299
305 NotImplemented(const std::string &info);
306 };
307 }
308}
309#endif /* __BE_EXCEPTION_H__ */
Error when converting one object into another, a property value from string to int,...
Definition: be_error_exception.h:125
ConversionError()
Construct a ConversionError object with the default information string.
ConversionError(const std::string &info)
Construct a ConversionError object with an information string appended to the default information str...
Error when reading data from an external source.
Definition: be_error_exception.h:149
DataError(const std::string &info)
Construct a DataError object with an information string appended to the default information string.
DataError()
Construct a DataError object with the default information string.
The parent class of all BiometricEvaluation exceptions.
Definition: be_error_exception.h:31
Exception()
Construct an Exception object without an information string.
const std::string whatString() const noexcept
Obtain the information string associated with the exception.
Exception(std::string info)
Construct an Exception object with an information string.
const char * what() const noexcept
Obtain the information string associated with the exception.
File error when opening, reading, writing, etc.
Definition: be_error_exception.h:84
FileError(const std::string &info)
Construct a FileError object with an information string appended to the default information string.
FileError()
Construct a FileError object with the default information string.
An error occurred when allocating an object.
Definition: be_error_exception.h:169
MemoryError()
Construct a MemoryError object with the default information string.
MemoryError(const std::string &info)
Construct a MemoryError object with an information string appended to the default information string.
A NotImplemented object is thrown when the underlying implementation of this interface has not or cou...
Definition: be_error_exception.h:292
NotImplemented()
Construct a NotImplemented object with the default information string.
NotImplemented(const std::string &info)
Construct a NotImplemented object with an information string appended to the default information stri...
The named object does not exist.
Definition: be_error_exception.h:209
ObjectDoesNotExist()
Construct a ObjectDoesNotExist object with the default information string.
ObjectDoesNotExist(const std::string &info)
Construct a ObjectDoesNotExist object with an information string appended to the default information ...
The named object exists and will not be replaced.
Definition: be_error_exception.h:189
ObjectExists(const std::string &info)
Construct a ObjectExists object with an information string appended to the default information string...
ObjectExists()
Construct a ObjectExists object with the default information string.
The object is closed.
Definition: be_error_exception.h:249
ObjectIsClosed()
Construct a ObjectIsClosed object with the default information string.
ObjectIsClosed(const std::string &info)
Construct a ObjectIsClosed object with an information string appended to the default information stri...
The object is already opened.
Definition: be_error_exception.h:229
ObjectIsOpen()
Construct a ObjectIsOpen object with the default information string.
ObjectIsOpen(const std::string &info)
Construct a ObjectIsOpen object with an information string appended to the default information string...
An invalid parameter was passed to a constructor or method.
Definition: be_error_exception.h:104
ParameterError(const std::string &info)
Construct a ParameterError object with an information string appended to the default information stri...
ParameterError()
Construct a ParameterError object with the default information string.
A StrategyError object is thrown when the underlying implementation of this interface encounters an e...
Definition: be_error_exception.h:270
StrategyError()
Construct a StrategyError object with the default information string.
StrategyError(const std::string &info)
Construct a StrategyError object with an information string appended to the default information strin...