]> Dogcows Code - chaz/yoink/blob - src/stlplus/portability/portability_exceptions.hpp
cleanup stlplus files
[chaz/yoink] / src / stlplus / portability / portability_exceptions.hpp
1 #ifndef STLPLUS_PORTABILITY_EXCEPTIONS
2 #define STLPLUS_PORTABILITY_EXCEPTIONS
3 ////////////////////////////////////////////////////////////////////////////////
4
5 // Author: Andy Rushton
6 // Copyright: (c) Southampton University 1999-2004
7 // (c) Andy Rushton 2004-2009
8 // License: BSD License, see ../docs/license.html
9
10 // Adds missing arithmetic exceptions used in this library but missing from std
11
12 ////////////////////////////////////////////////////////////////////////////////
13 #include "portability_fixes.hpp"
14 #include <string>
15 #include <stdexcept>
16
17 namespace stlplus
18 {
19
20 ////////////////////////////////////////////////////////////////////////////////
21 // thrown by division when the divisor is zero
22 // This is a subclass of std::logic_error so can be caught by a generic catch clause for the superclass
23
24 class divide_by_zero : public std::logic_error {
25 public:
26 divide_by_zero (const std::string& what_arg): std::logic_error (what_arg) { }
27 };
28
29 ////////////////////////////////////////////////////////////////////////////////
30
31 } // end namespace stlplus
32
33 #endif
This page took 0.034242 seconds and 4 git commands to generate.