1 #ifndef NUITRACK_EXCEPTION_TO_NUITRACK_ERROR_H_
2 #define NUITRACK_EXCEPTION_TO_NUITRACK_ERROR_H_
4 #include "nuitrack/types/Error.h"
11 inline nuitrack_error* exceptionToNuitrackError(
const Exception &e)
13 const auto message = e.what();
18 return new nuitrack_error(
new Exception(message));
20 return new nuitrack_error(
new TerminateException(message));
22 return new nuitrack_error(
new BadConfigValueException(message));
24 return new nuitrack_error(
new ConfigNotFoundException(message));
26 return new nuitrack_error(
new ModuleNotFoundException(message));
28 return new nuitrack_error(
new LicenseNotAcquiredException(message));
30 return new nuitrack_error(
new ModuleNotInitializedException(message));
32 return new nuitrack_error(
new ModuleNotStartedException(message));
tdv::nuitrack::ModuleNotInitializedException
Definition: Error.h:29
tdv::nuitrack::ModuleNotFoundException
Definition: Error.h:27
tdv::nuitrack::ConfigNotFoundException
Definition: Error.h:26
tdv::nuitrack::TerminateException
Definition: Error.h:24
tdv::nuitrack::Exception
Definition: Error.h:23
tdv::nuitrack::BadConfigValueException
Definition: Error.h:25
tdv::nuitrack::ModuleNotStartedException
Definition: Error.h:30
tdv::nuitrack::LicenseNotAcquiredException
Definition: Error.h:28