-
+// gdcmException.cxx
+//-----------------------------------------------------------------------------
#include "gdcmException.h"
#include <typeinfo>
#include <stdio.h>
+//-----------------------------------------------------------------------------
+// gdcmException
gdcmException::gdcmException(const std::string &f, const std::string& msg) throw()
#ifdef __GNUC__
try
#endif
-
void gdcmException::fatal(const char *from) throw() {
try {
std::cerr << "Fatal: exception received in " << from
}
}
-
std::string gdcmException::getName() const throw() {
try {
#ifdef __GNUC__ // GNU C++ compiler class name demangling
}
}
-
gdcmException::operator const char *() const throw() {
return getName().c_str();
}
-
+//-----------------------------------------------------------------------------
std::ostream& operator<<(std::ostream &os, const gdcmException &e) {
try {
os << "Exception " << e.getName() << " thrown: " << e.getError() << std::endl;
return os;
}
-
+//-----------------------------------------------------------------------------