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
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ profile.cc
units.cc
string_ref.cc
platform.cc
message.cc
)
set(OST_BASE_HEADERS
......
#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 @@
namespace ost {
struct DLLEXPORT Message: public std::exception {
Message(const String& mesg,const String& prefix=""):
_prefix(prefix), _mesg(mesg) {}
virtual ~Message() throw() {}
struct DLLEXPORT_OST_BASE Message: public std::exception {
Message(const String& mesg,const String& prefix="");
virtual ~Message() throw();
// exception interface
virtual const char* what() const throw() {
String msg = _prefix + ": " +_mesg;
return msg.c_str();
}
virtual const char* what() const throw();
String _prefix;
String _mesg;
};
struct DLLEXPORT Error: public Message {
Error(const String& m): Message(m,"Error") {}
struct DLLEXPORT_OST_BASE Error: public Message {
Error(const String& m);
};
} // namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment