00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef STXXL_EXCEPTIONS_H_
00015 #define STXXL_EXCEPTIONS_H_
00016
00017 #include <iostream>
00018 #include <string>
00019 #include <stdexcept>
00020
00021 #include <stxxl/bits/namespace.h>
00022
00023
00024 __STXXL_BEGIN_NAMESPACE
00025
00026 class io_error : public std::ios_base::failure
00027 {
00028 public:
00029 io_error() throw () :
00030 std::ios_base::failure("")
00031 { }
00032
00033 io_error(const std::string & msg_) throw () :
00034 std::ios_base::failure(msg_)
00035 { }
00036 };
00037
00038 class resource_error : public std::runtime_error
00039 {
00040 public:
00041 resource_error() throw () :
00042 std::runtime_error("")
00043 { }
00044
00045 resource_error(const std::string & msg_) throw () :
00046 std::runtime_error(msg_)
00047 { }
00048 };
00049
00050 class bad_ext_alloc : public std::runtime_error
00051 {
00052 public:
00053 bad_ext_alloc() throw () :
00054 std::runtime_error("")
00055 { }
00056
00057 bad_ext_alloc(const std::string & msg_) throw () :
00058 std::runtime_error(msg_)
00059 { }
00060 };
00061
00062 class bad_parameter : public std::runtime_error
00063 {
00064 public:
00065 bad_parameter() throw () :
00066 std::runtime_error("")
00067 { }
00068
00069 bad_parameter(const std::string & msg_) throw () :
00070 std::runtime_error(msg_)
00071 { }
00072 };
00073
00074 class unreachable : public std::runtime_error
00075 {
00076 public:
00077 unreachable() throw () :
00078 std::runtime_error("")
00079 { }
00080
00081 unreachable(const std::string & msg_) throw () :
00082 std::runtime_error(msg_)
00083 { }
00084 };
00085
00086 __STXXL_END_NAMESPACE
00087
00088 #endif // !STXXL_EXCEPTIONS_H_
00089