code/include/NewWave/Exceptions.hh
Go to the documentation of this file.
00001 #ifndef NEWWAVE_EXCEPTIONS_HH 00002 #define NEWWAVE_EXCEPTIONS_HH 00003 00004 #include <stdexcept> 00005 #include <string> 00006 00007 namespace NewWave { 00008 00009 using std::string; 00010 using std::to_string; 00011 00013 class PixelDefinitionException : public std::runtime_error{ 00014 00015 public: 00016 PixelDefinitionException(const string &msg): 00017 std::runtime_error("Pixel array definition is bad: " +msg){}; 00018 00019 }; 00020 00022 00027 class NotCompiledException : public std::runtime_error{ 00028 00029 public: 00030 NotCompiledException(const string &msg): 00031 std::runtime_error("Feature is not compiled: " + msg){}; 00032 00033 }; 00034 00036 class PixelArrayMismatch : public std::runtime_error{ 00037 public: 00038 PixelArrayMismatch(): 00039 std::runtime_error("The pixel array size does not match."){}; 00040 }; 00041 00043 class GSLException : public std::runtime_error{ 00044 public: 00045 GSLException(): 00046 std::runtime_error("GSL wavelet transform failed due either to lack of memory allocation, data that is not radix 2 or input that is not an NxN array."){}; 00047 00048 }; 00049 00051 class PileUpThresholdException : public std::runtime_error{ 00052 public: 00053 PileUpThresholdException(): 00054 std::runtime_error("Pile up threshold must be positive"){}; 00055 }; 00056 00058 class InvalidFrequencyBand: public std::runtime_error{ 00059 public: 00060 InvalidFrequencyBand(): std::runtime_error("Invalid number of coefficients in frequency band"){} 00061 }; 00062 00064 class WrongCoefficient: public std::runtime_error{ 00065 public: 00066 WrongCoefficient(int y, int phi, int expectedY, int expectedPhi): std::runtime_error("Wavelet levels of coefficient do not match the frequency band: coefficient = {" + to_string(y) + "," + to_string(phi) + "}, expected = {" + to_string(expectedY) + ", " + to_string(expectedPhi) + "}"){} 00067 }; 00068 00069 class NullEvent: public std::runtime_error{ 00070 public: 00071 NullEvent(): std::runtime_error("WaveletEvent is null"){} 00072 }; 00073 00074 } 00075 00076 #endif Generated on Wed Aug 23 2017 12:59:15 for New Wave - Noise Elimination With Wavelets At Vast Energies by 1.7.6.1 |