C:/nobackup/private/physical_svn/trunk/include/physical/exception.hpp

Go to the documentation of this file.
00001 
00002 /*=============================================================================
00003     physical quantities / units / constants
00004     Copyright (c) 2006, 2007 Martin Schulz
00005     http://physical.sourceforge.net
00006   
00007     This is private code by Martin Schulz.
00008   
00009     Use, modification and distribution is subject to the Boost Software
00010     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
00011     http://www.boost.org/LICENSE_1_0.txt)
00012 =============================================================================*/
00013 
00014 #ifndef PHYSICAL_EXCEPTION
00015 #define PHYSICAL_EXCEPTION
00016 
00017 #include <stdexcept>
00018 
00019 namespace physical {
00020 
00021         // exception thrown inside of the physical unit library.
00022         // There are few occasions that exceptions can be thrown:
00023         // addition of, subtraction of, conversion and comparision 
00024         // between incompatible dimensions. 
00025         // Format requested in incompatible unit (alternatively could print 
00026         // computed unit instead of the requested. FIXME: How to configure this?)
00027         struct IncompatibleUnitException: public std::range_error {
00028                 IncompatibleUnitException(std::string w): std::range_error(w){};
00029         };
00030 
00031 }; // namespace physical
00032 
00033 
00034 #endif

Generated on Mon Apr 2 22:25:03 2007 for physical_svn by  doxygen 1.5.1-p1
hosted on SourceForge.net Logo