treelite
Classes | Typedefs | Functions
c_api_error.cc File Reference

C error handling. More...

#include <dmlc/thread_local.h>
#include "./c_api_error.h"
Include dependency graph for c_api_error.cc:

Go to the source code of this file.

Classes

struct  TreeliteAPIErrorEntry
 

Typedefs

typedef dmlc::ThreadLocalStore< TreeliteAPIErrorEntryTreeliteAPIErrorStore
 

Functions

const char * TreeliteGetLastError ()
 display last error; can be called by multiple threads Note. Each thread will get the last error occured in its own context. More...
 
void TreeliteAPISetLastError (const char *msg)
 Set the last error message needed by C API. More...
 

Detailed Description

C error handling.

Copyright (c) 2017 by Contributors

Author
Philip Cho

Definition in file c_api_error.cc.

Function Documentation

void TreeliteAPISetLastError ( const char *  msg)

Set the last error message needed by C API.

Parameters
msgThe error message to set.

Definition at line 20 of file c_api_error.cc.

const char* TreeliteGetLastError ( )

display last error; can be called by multiple threads Note. Each thread will get the last error occured in its own context.

Returns
error string

Definition at line 16 of file c_api_error.cc.