25#ifndef _SOURCE_TFERROR_H_
26#define _SOURCE_TFERROR_H_
78 #define tf_error(code, msg) errSet(code, msg, __LINE__, __FILE__, TF_FUNCTION)
80 #define tf_exp(e) expSet(e, "", __LINE__, __FILE__, TF_FUNCTION)
82 #define TF_RETURN_EXP(e) expSet(e, "", __LINE__, __FILE__, TF_FUNCTION); return NULL
92 CPPAPI_FUNC(
HRESULT)
expSet(
const std::exception&,
const char* msg,
int line,
const char* file,
const char* func);
133 os << std::string(
"Code: ");
134 os << std::to_string(err.
err);
135 os << std::string(
", Msg: ");
137 os << std::string(
", File: ");
139 os << std::string(
", Line: ");
140 os << std::to_string(err.
lineno);
141 os << std::string(
", Function: ");
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
std::string errStr(const Error &err)
HRESULT clearErrorCallbacks()
Remove all error callbacks from the registry.
HRESULT expSet(const std::exception &, const char *msg, int line, const char *file, const char *func)
HRESULT removeErrorCallback(const unsigned int &cb_id)
Remove an error callback from the registry.
std::vector< Error > errGetAll()
HRESULT errSet(HRESULT code, const char *msg, int line, const char *file, const char *func)
unsigned int addErrorCallback(ErrorCallback &cb)
Register an error callback.
void(* ErrorCallback)(const Error &err)
Definition tfError.h:56
std::string func
Definition tfError.h:52
std::string msg
Definition tfError.h:43
std::string fname
Definition tfError.h:49
int lineno
Definition tfError.h:46
HRESULT err
Definition tfError.h:40
int32_t HRESULT
Definition tf_port.h:255