diff options
Diffstat (limited to 'cpp/src/qpid/QpidError.cpp')
-rw-r--r-- | cpp/src/qpid/QpidError.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/cpp/src/qpid/QpidError.cpp b/cpp/src/qpid/QpidError.cpp index 0b5135269b..70fff6550a 100644 --- a/cpp/src/qpid/QpidError.cpp +++ b/cpp/src/qpid/QpidError.cpp @@ -24,12 +24,21 @@ using namespace qpid; -QpidError::QpidError(int _code, const std::string& _msg, const std::string& _file, int _line) throw() - : code(_code), msg(_msg), file(_file), line(_line) +QpidError::QpidError() : code(0) {} + +QpidError::QpidError(int _code, const std::string& _msg, + const SrcLine& _loc) throw() + : code(_code), msg(_msg), location(_loc) { std::ostringstream os; - os << "QpidError(" << code << ") " << msg << " (" << file << ":" << line << ")"; + os << "Error [" << code << "] " << msg << " (" + << location.file << ":" << location.line << ")"; whatStr = os.str(); } QpidError::~QpidError() throw() {} + +Exception* QpidError::clone() const throw() { return new QpidError(*this); } + +void QpidError::throwSelf() const { throw *this; } + |