dmlite
0.6
include
dmlite
cpp
exceptions.h
Go to the documentation of this file.
1
/// @file include/dmlite/cpp/exceptions.h
2
/// @brief Exceptions used by the API
3
/// @author Alejandro Álvarez Ayllón <aalvarez@cern.ch>
4
#ifndef DMLITE_CPP_EXCEPTIONS_H
5
#define DMLITE_CPP_EXCEPTIONS_H
6
7
#include "
dmlite/common/config.h
"
8
#include "
dmlite/common/errno.h
"
9
10
#include <cstdarg>
11
#include <exception>
12
#include <string>
13
14
namespace
dmlite
{
15
16
/// Base exception class
17
class
DmException
:
public
std::exception {
18
public
:
19
DmException
();
20
DmException
(
int
code
);
21
DmException
(
int
code
,
const
std::string &
string
);
22
DmException
(
int
code
,
const
char
* fmt, va_list args);
23
DmException
(
int
code
,
const
char
* fmt, ...);
24
25
DmException
(
const
DmException
&de);
26
27
virtual
~DmException
()
throw
();
28
29
int
code
()
const
throw
();
30
const
char
*
what
()
const
throw
();
31
32
// reports an exception to the log
33
void
report
()
const
throw
();
34
35
protected
:
36
int
errorCode_
;
37
std::string
errorMsg_
;
38
std::string
stacktrace_
;
39
40
void
setMessage
(
const
char
* fmt, va_list args);
41
};
42
43
};
44
45
#endif // DMLITE_CPP_EXCEPTIONS_H
dmlite::DmException::what
const char * what() const
dmlite::DmException::stacktrace_
std::string stacktrace_
Definition:
exceptions.h:38
dmlite::DmException::DmException
DmException()
dmlite::DmException::errorCode_
int errorCode_
Definition:
exceptions.h:36
dmlite::DmException::setMessage
void setMessage(const char *fmt, va_list args)
dmlite::DmException::code
int code() const
dmlite::DmException
Base exception class.
Definition:
exceptions.h:17
dmlite::DmException::report
void report() const
dmlite::DmException::~DmException
virtual ~DmException()
config.h
Header generated by CMake with the build configuration used.
dmlite
Namespace for the dmlite C++ API.
Definition:
authn.h:15
dmlite::DmException::errorMsg_
std::string errorMsg_
Definition:
exceptions.h:37
errno.h
Error codes.
Generated on Tue Sep 24 2019 00:00:00 for dmlite by
1.8.16