Img2Num C
API Documentation
Loading...
Searching...
No Matches
img2num_error_t.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  img2num_error_t {
  IMG2NUM_OK = 0 , IMG2NUM_ERROR_BAD_ALLOC = 1 , IMG2NUM_ERROR_INVALID_ARGUMENT = 2 , IMG2NUM_ERROR_RUNTIME = 3 ,
  IMG2NUM_ERROR_UNKNOWN = 4
}
 

Functions

img2num_error_t img2num_get_last_error ()
 
const char * img2num_get_last_error_message ()
 
void img2num_clear_last_error ()
 

Enumeration Type Documentation

◆ img2num_error_t

Enumerator
IMG2NUM_OK 
IMG2NUM_ERROR_BAD_ALLOC 
IMG2NUM_ERROR_INVALID_ARGUMENT 
IMG2NUM_ERROR_RUNTIME 
IMG2NUM_ERROR_UNKNOWN 

Definition at line 9 of file img2num_error_t.h.

9 {
10 IMG2NUM_OK = 0,
img2num_error_t
@ IMG2NUM_ERROR_RUNTIME
@ IMG2NUM_ERROR_BAD_ALLOC
@ IMG2NUM_OK
@ IMG2NUM_ERROR_INVALID_ARGUMENT
@ IMG2NUM_ERROR_UNKNOWN

Function Documentation

◆ img2num_clear_last_error()

void img2num_clear_last_error ( )

Definition at line 38 of file img2num_error_t.cpp.

38 {
39 img2num::clear_last_error();
40}

◆ img2num_get_last_error()

img2num_error_t img2num_get_last_error ( )

Definition at line 27 of file img2num_error_t.cpp.

27 {
28 const img2num::Error cpp_err {img2num::get_last_error()};
29 return cpp_error_to_c_error(cpp_err);
30}

◆ img2num_get_last_error_message()

const char * img2num_get_last_error_message ( )

Definition at line 32 of file img2num_error_t.cpp.

32 {
33 static thread_local std::string msg;
34 msg = img2num::get_last_error_message();
35 return msg.c_str();
36}