Img2Num C
API Documentation
img2num_error_t.cpp File Reference
#include "cimg2num/img2num_error_t.h"
#include <cstring>
#include "img2num/Error.h"
+ Include dependency graph for img2num_error_t.cpp:

Go to the source code of this file.

Functions

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

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 }