00001 #ifndef RINGS_EXCEPTIONS_H__
00002 #define RINGS_EXCEPTIONS_H__
00003 #include<string>
00004
00008 namespace RingEx
00009 {
00012 class RingException
00013 { };
00014
00018 class NonUnitDivision : RingException
00019 { };
00020
00026 class InvalidOperation : RingException
00027 { };
00028
00032 class FailedConversion : RingException
00033 { };
00034
00044 class Unimplemented : RingException
00045 {
00046 public:
00047 std::string reason;
00048
00049 Unimplemented(std::string s) : reason(s)
00050 {}
00051
00052 Unimplemented() : reason("")
00053 {}
00054 };
00055
00073 class Generic : RingException
00074 {
00075 public:
00076 std::string reason;
00077
00078 Generic(std::string s) : reason(s)
00079 {}
00080 };
00081 }
00082
00083 #endif