Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdexcept>
- #include <string>
- class SocketException : public std::runtime_error {
- public:
- SocketException(const std::string& message)
- : std::runtime_error(message)
- { }
- };
- class FileNotFoundException : public std::runtime_error {
- public:
- FileNotFoundException(const std::string& filename)
- : std::runtime_error("File not found")
- {
- _filename = filename;
- }
- std::string filename()
- {
- return _filename;
- }
- protected:
- std::string _filename;
- };
- shax@cl-297:~/katana$ make
- g++ -I /usr/src/boost_1_39_0 -L/usr/src/boost_1_39_0/stage/lib/ -lboost_system-gcc43-mt -lboost_thread-gcc43-mt main.cpp katana.cpp poll_manager.cpp -o katana
- In file included from system_manager.hpp:7,
- from katana.hpp:6,
- from main.cpp:1:
- exceptions.hpp:11: error: looser throw specifier for âvirtual FileNotFoundException::~FileNotFoundException()â
- /usr/include/c++/4.3/stdexcept:117: error: overriding âvirtual std::runtime_error::~runtime_error() throw ()â
- In file included from katana.hpp:6,
- from main.cpp:1:
- system_manager.hpp:13: error: expected `:' before âsize_tâ
- In file included from system_manager.hpp:7,
- from katana.hpp:6,
- from katana.cpp:1:
- exceptions.hpp:11: error: looser throw specifier for âvirtual FileNotFoundException::~FileNotFoundException()â
- /usr/include/c++/4.3/stdexcept:117: error: overriding âvirtual std::runtime_error::~runtime_error() throw ()â
- In file included from katana.hpp:6,
- from katana.cpp:1:
- system_manager.hpp:13: error: expected `:' before âsize_tâ
- In file included from poll_manager.hpp:8,
- from poll_manager.cpp:1:
- exceptions.hpp:11: error: looser throw specifier for âvirtual FileNotFoundException::~FileNotFoundException()â
- /usr/include/c++/4.3/stdexcept:117: error: overriding âvirtual std::runtime_error::~runtime_error() throw ()â
- make: *** [katana] Error 1
- shax@cl-297:~/katana$
Add Comment
Please, Sign In to add comment