00001 #include "Exception.h" 00002 00003 using std::string; 00004 00005 Exception::Exception(const std::string& arg_msg) : m_msg(arg_msg) { } 00006 Exception::~Exception() throw() {} 00007 00008 string Exception::getMessage() const 00009 { 00010 return m_msg; 00011 } 00012 00013 string Exception::getName() const 00014 { 00015 return "Generic Exception"; 00016 } 00017 00018 string Exception::toString() const 00019 { 00020 if (getMessage().empty()) 00021 return getName(); 00022 else 00023 return getName() + ": " + getMessage(); 00024 } 00025