14#ifndef __PTPMGMT_ERR_H
15#define __PTPMGMT_ERR_H
20__PTPMGMT_NAMESPACE_BEGIN
39 void doError(
bool use_errno,
const char *file,
int line,
const char *func,
40 const std::string &msg);
41 const std::string &fetch();
42 static Error &getCur();
47 static void perror(
const char *file,
int line,
const char *func,
48 const std::string &msg)
49 { getCur().doError(
true, file, line, func, msg); }
50 static void error(
const char *file,
int line,
const char *func,
51 const std::string &msg)
52 { getCur().doError(
false, file, line, func, msg); }
53 static std::string doFormat(
const char *format, ...);
54 static void clear() { getCur().m_line = 0; }
102__PTPMGMT_NAMESPACE_END
Get Last Error happend in library, C API.
Keep last error.
Definition err.h:29
static const std::string & getErrnoMsg()
static const std::string & getError()
static const std::string & getFile()
static const std::string & getMsg()
static const std::string & getFunc()