1 #ifndef FILESEQ_ERROR_H_
2 #define FILESEQ_ERROR_H_
10 #define DEPRECATED(func) func __attribute__ ((deprecated))
11 #elif defined(_MSC_VER)
12 #define DEPRECATED(func) __declspec(deprecated) func
14 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
15 #define DEPRECATED(func) func
34 operator bool()
const {
return m_error.empty(); }
37 operator std::string()
const {
return m_error; }
41 Status& operator=(
const Status& rhs) {
42 m_error = rhs.m_error;
46 void clearError() { m_error.clear(); }
47 void setError(
const std::string &err) { m_error = err; }
48 void setError(
const char* err) { m_error = err; }
50 friend std::ostream& operator<< (std::ostream& stream,
const Status& stat) {
51 stream << (std::string)stat;
63 void handleErrorStatus(
const std::string &msg, Status* stat=
nullptr);
65 void setError(
const std::string &msg, Status* stat);