You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
767 B
36 lines
767 B
#ifndef EXCEPTION_H
|
|
#define EXCEPTION_H
|
|
|
|
|
|
#include <exception>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <iostream>
|
|
|
|
|
|
namespace merge_lib
|
|
{
|
|
class Exception : public std::exception
|
|
{
|
|
public:
|
|
Exception() {}
|
|
|
|
Exception(const char * message) : _message(message) {}
|
|
|
|
Exception(std::string & message) : _message(message) {}
|
|
|
|
Exception(std::stringstream & message) : _message(message.str()) {}
|
|
|
|
Exception(const std::string & message) : _message(message) {}
|
|
|
|
virtual ~Exception() throw () {}
|
|
|
|
virtual const char * what() const throw() { return _message.c_str(); }
|
|
|
|
void show() const {}
|
|
|
|
protected:
|
|
std::string _message;
|
|
};
|
|
}
|
|
#endif // EXCEPTION_HH
|
|
|