00001 #ifndef SPLINE_EXCEPTIONS_HH 00002 #define SPLINE_EXCEPTIONS_HH 00003 00004 #include <stdexcept> 00005 00006 namespace Spline{ 00007 00009 class EvaluationException: public std::runtime_error{ 00010 00011 public: 00012 EvaluationException(): std::runtime_error 00013 ("Unable to evaluate b-spline: control points or coefficients not set!"){}; 00014 00015 }; 00016 00018 class BasisException: public std::runtime_error{ 00019 00020 public: 00021 BasisException(): std::runtime_error 00022 ("Unable to evaluate basis functions: knot vector not set!"){}; 00023 00024 }; 00025 00026 class MatrixException: public std::runtime_error{ 00027 public: 00028 MatrixException(): std::runtime_error 00029 ("row or column index is beyond matrix bounds!"){}; 00030 }; 00031 00032 } 00033 #endif