C++ Library containing a lot of needful things: Stack Trace, Command Line Parser, Resource Handling, Configuration Files, Unix Command Execution, Directories, Regular Expressions, Tokenizer, Function Trace, Standard Extensions.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
20 years ago
|
/** @file
|
||
|
|
||
|
$Id$
|
||
|
|
||
|
$Date$
|
||
|
$Author$
|
||
|
|
||
|
@copy © Marc Wäckerlin
|
||
|
@license LGPL, see file <a href="license.html">COPYING</a>
|
||
|
|
||
|
$Log$
|
||
|
Revision 1.2 2004/08/28 16:21:25 marc
|
||
|
mrw-c++-0.92 (mrw)
|
||
13 years ago
|
- new file: version.cxx
|
||
20 years ago
|
- new file header for all sources
|
||
|
- work around warning in mrw::auto<T>
|
||
|
- possibility to compile without log4cxx
|
||
|
- work around bugs in demangle.h and libiberty.h
|
||
|
- corrections in documentation
|
||
|
- added simple tracing mechanism
|
||
|
- more warnings
|
||
|
- small corrections in Auto<>::Free and a new test for it
|
||
|
- possibility to compile without stack trace
|
||
|
|
||
|
*/
|
||
13 years ago
|
#include <mrw/exception.hxx>
|
||
20 years ago
|
|
||
|
#ifdef HAVE_STACKTRACE
|
||
13 years ago
|
# include <mrw/stacktrace.hxx>
|
||
20 years ago
|
#else
|
||
|
namespace mrw {
|
||
|
class StackTrace {
|
||
|
public:
|
||
|
operator std::string() throw() {return "";}
|
||
|
};
|
||
|
}
|
||
|
#endif
|
||
21 years ago
|
|
||
|
namespace mrw {
|
||
|
exception::exception() throw(std::bad_exception):
|
||
|
_stacktrace(new StackTrace) {
|
||
|
}
|
||
|
exception::~exception() throw() {
|
||
|
delete _stacktrace;
|
||
|
}
|
||
|
const std::string& exception::stacktrace() const throw(std::bad_exception) {
|
||
|
static const std::string st(*_stacktrace);
|
||
|
return st;
|
||
|
}
|
||
|
}
|