Michele De Stefano's C++ Utilities
exception.hpp
Go to the documentation of this file.
1 // mds_utils/python/exception.hpp
2 //
3 // Copyright (c) 2014 - Michele De Stefano (micdestefano@users.sourceforge.net)
4 //
5 // Distributed under the MIT License (See accompanying file LICENSE)
6 
7 #ifndef MDS_UTILS_PYTHON_EXCEPTION_HPP_INCLUDED
8 #define MDS_UTILS_PYTHON_EXCEPTION_HPP_INCLUDED
9 
10 #include <stdexcept>
11 
29 namespace mds_utils { namespace python {
30 
40 struct index_error : public std::invalid_argument {
41 
50  explicit index_error(const std::string& what_arg) :
51  std::invalid_argument(what_arg) {}
52 
61  explicit index_error(const char* what_arg) :
62  std::invalid_argument(what_arg) {}
63 };
64 
65 }}
66 
67 
68 #endif /* MDS_UTILS_PYTHON_EXCEPTION_HPP_INCLUDED */
index_error(const std::string &what_arg)
Constructor.
Definition: exception.hpp:50
index_error(const char *what_arg)
Constructor.
Definition: exception.hpp:61
Main namespace of all Michele De Stefano&#39;s C++ utilities.
Definition: endian.hpp:30
Exception used for detecting and raising IndexError Python exceptions.
Definition: exception.hpp:40