Eliminated some problems resulting from last merge
[openstranded.git] / src / error.cc
blobaa7f4a79963cd176f4c23e01080b6e1b0a3effdc
1 #include <iostream>
2 #include <string>
3 #include "error.hh"
5 StrandedException::StrandedException (const char* m)
7 this->message = std::string (m);
10 StrandedException::StrandedException (const std::string& m)
12 this->message = m;
15 StrandedException::~StrandedException () throw ()
18 const char*
19 StrandedException::what () throw ()
21 return message.c_str ();
24 void
25 StrandedException::print ()
27 std::cout << "StrandedException: " << this->what () << std::endl;
32 * Derived constructors
35 StrandedWarning::StrandedWarning (const char* m):
36 StrandedException (m) {}
38 StrandedWarning::StrandedWarning (const std::string& m):
39 StrandedException (m) {}
41 StrandedError::StrandedError (const char* m):
42 StrandedException (m) {}
44 StrandedError::StrandedError (const std::string& m):
45 StrandedException (m) {}
47 StrandedFatal::StrandedFatal (const char* m):
48 StrandedException (m) {}
50 StrandedFatal::StrandedFatal (const std::string& m):
51 StrandedException (m) {}
54 * Derived methods
57 void
58 StrandedWarning::print ()
60 std::cout << "StrandedWarning: " << this->what () << std::endl;
63 void
64 StrandedError::print ()
66 std::cout << "StrandedError: " << this->what () << std::endl;
69 void
70 StrandedFatal::print ()
72 std::cout << "StrandedFatal: " << this->what () << std::endl;