Img2Num C
API Documentation
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 34 of file img2num_error_t.cpp.

34  {
35  img2num::clear_last_error();
36 }

◆ img2num_get_last_error()

img2num_error_t img2num_get_last_error ( )

Definition at line 23 of file img2num_error_t.cpp.

23  {
24  const img2num::Error cpp_err{img2num::get_last_error()};
25  return cpp_error_to_c_error(cpp_err);
26 }

◆ img2num_get_last_error_message()

const char* img2num_get_last_error_message ( )

Definition at line 28 of file img2num_error_t.cpp.

28  {
29  static thread_local std::string msg;
30  msg = img2num::get_last_error_message();
31  return msg.c_str();
32 }