ALPSCore reference
errors.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1998-2018 ALPS Collaboration. See COPYRIGHT.TXT
3  * All rights reserved. Use is subject to license terms. See LICENSE.TXT
4  * For use in publications, see ACKNOWLEDGE.TXT
5  */
6 
7 #ifndef ALPS_HDF5_ERROR_HPP
8 #define ALPS_HDF5_ERROR_HPP
9 
10 #include <string>
11 #include <stdexcept>
12 
13 namespace alps {
14  namespace hdf5 {
15 
16  class archive_error : public std::runtime_error {
17  public:
18  archive_error(std::string const & what)
19  : std::runtime_error(what)
20  {}
21  };
22 
23  #define DEFINE_ALPS_HDF5_EXCEPTION(name) \
24  class name : public archive_error { \
25  public: \
26  name (std::string const & what) \
27  : archive_error(what) \
28  {} \
29  };
38  #undef DEFINE_ALPS_HDF5_EXCEPTION
39  }
40 };
41 
42 #endif
#define DEFINE_ALPS_HDF5_EXCEPTION(name)
Definition: errors.hpp:23
STL namespace.
archive_error(std::string const &what)
Definition: errors.hpp:18