WFMath
1.0.2
|
00001 // -*-C++-*- 00002 // error.h (Class structures for errors thrown by the WFMath library) 00003 // 00004 // The WorldForge Project 00005 // Copyright (C) 2001 The WorldForge Project 00006 // 00007 // This program is free software; you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation; either version 2 of the License, or 00010 // (at your option) any later version. 00011 // 00012 // This program is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with this program; if not, write to the Free Software 00019 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 // 00021 // For information about WorldForge and its authors, please contact 00022 // the Worldforge Web Site at http://www.worldforge.org. 00023 00024 // Author: Ron Steinke 00025 // Created: 2001-12-7 00026 00027 #ifndef WFMATH_ERROR_H 00028 #define WFMATH_ERROR_H 00029 00030 #include <stdexcept> 00031 #include <wfmath/vector.h> 00032 00033 namespace WFMath { 00034 00036 template<int dim> 00037 struct ColinearVectors : virtual public std::exception { 00038 ColinearVectors(const Vector<dim>& v1_in, const Vector<dim>& v2_in) 00039 : v1(v1_in), v2(v2_in) {} 00040 virtual ~ColinearVectors() throw () { } 00041 00042 Vector<dim> v1, v2; 00043 }; 00044 00046 struct ParseError : virtual public std::exception { 00047 virtual ~ParseError() throw () { } 00048 }; 00049 00050 } // namespace WFMath 00051 00052 #endif // WFMATH_ERROR_H