Skip to content
Snippets Groups Projects
Commit 422e7cb2 authored by marco's avatar marco
Browse files

move method bodies of Message to cc file

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1915 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 926c2be9
Branches
Tags
No related merge requests found
...@@ -7,6 +7,7 @@ profile.cc ...@@ -7,6 +7,7 @@ profile.cc
units.cc units.cc
string_ref.cc string_ref.cc
platform.cc platform.cc
message.cc
) )
set(OST_BASE_HEADERS set(OST_BASE_HEADERS
......
#include "message.hh" #include "message.hh"
namespace ost {
Message::Message(const String& mesg,const String& prefix):
_prefix(prefix), _mesg(mesg) {}
Message::~Message() throw() {}
const char* Message::what() const throw() {
String msg = _prefix + ": " +_mesg;
return msg.c_str();
}
Error::Error(const String& m): Message(m,"Error") {}
}
\ No newline at end of file
...@@ -31,22 +31,18 @@ ...@@ -31,22 +31,18 @@
namespace ost { namespace ost {
struct DLLEXPORT Message: public std::exception { struct DLLEXPORT_OST_BASE Message: public std::exception {
Message(const String& mesg,const String& prefix=""): Message(const String& mesg,const String& prefix="");
_prefix(prefix), _mesg(mesg) {} virtual ~Message() throw();
virtual ~Message() throw() {}
// exception interface // exception interface
virtual const char* what() const throw() { virtual const char* what() const throw();
String msg = _prefix + ": " +_mesg;
return msg.c_str();
}
String _prefix; String _prefix;
String _mesg; String _mesg;
}; };
struct DLLEXPORT Error: public Message { struct DLLEXPORT_OST_BASE Error: public Message {
Error(const String& m): Message(m,"Error") {} Error(const String& m);
}; };
} // namespace } // namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment