Enrollment 28.2.0
Loading...
Searching...
No Matches
EnrollmentException.h
Go to the documentation of this file.
1
10
11#pragma once
12#include "SourceLocation.h"
13#include <cstring>
14#include <exception>
15#include <sstream>
16#include <string>
17
18namespace inno
19{
25 */
26 class EnrollmentException : public std::exception
27 {
28 public:
36 */
37 explicit EnrollmentException(std::string reason, SourceLocation location = SourceLocation())
38 : message(std::move(reason))
39 , sourceLocation(std::move(location))
40 {
41 }
42
49 */
50 [[nodiscard]] const char* what() const noexcept override
51 {
52 return message.c_str();
53 }
54
58 */
59 [[nodiscard]] SourceLocation Location() const noexcept
60 {
61 return sourceLocation;
62 }
63
67 */
68 [[nodiscard]] std::string ToString() const
69 {
70 return message + "\n" + sourceLocation.ToString();
71 }
72
73 private:
74 std::string message;
75 SourceLocation sourceLocation;
76 };
77
88 };
89
100 };
101
107 */
109 {
110 public:
111 using EnrollmentInvalidArgumentException::EnrollmentInvalidArgumentException;
112 };
113
119 */
121 {
122 public:
123 using EnrollmentInvalidArgumentException::EnrollmentInvalidArgumentException;
124 };
125
131 */
133 {
134 public:
135 using EnrollmentInvalidArgumentException::EnrollmentInvalidArgumentException;
136 };
137
143 */
145 {
146 public:
147 using EnrollmentInvalidArgumentException::EnrollmentInvalidArgumentException;
148 };
149
155 */
157 {
158 public:
159 using EnrollmentInvalidArgumentException::EnrollmentInvalidArgumentException;
160 };
161} // namespace inno
std::string ToString() const
Provides message with full info about exception.
Definition EnrollmentException.h:67
const char * what() const noexcept override
Provides error message.
Definition EnrollmentException.h:49
SourceLocation Location() const noexcept
Provides location of error.
Definition EnrollmentException.h:58
EnrollmentException(std::string reason, SourceLocation location=SourceLocation())
Construct EnrollmentException object.
Definition EnrollmentException.h:36
Base exception for all enrollment-sdk invalid argument exceptions.
Definition EnrollmentException.h:96
EnrollmentException(std::string reason, SourceLocation location=SourceLocation())
Construct EnrollmentException object.
Definition EnrollmentException.h:36
Base exception for all enrollment-sdk runtime exceptions.
Definition EnrollmentException.h:84
EnrollmentException(std::string reason, SourceLocation location=SourceLocation())
Construct EnrollmentException object.
Definition EnrollmentException.h:36
Template is incompatible in requested operation.
Definition EnrollmentException.h:132
Image has wrong format or dimensions or dpi and is not suitable for processing.
Definition EnrollmentException.h:144
The template is empty or or do not contain enough distinctive data or is corrupted.
Definition EnrollmentException.h:108
Null argument is not allowed.
Definition EnrollmentException.h:156
Class to capture the source location of an error or exception.
Definition SourceLocation.h:25
Template version is not supported in this variant of Enrollment SDK.
Definition EnrollmentException.h:120