1 #ifndef STLPLUS_PERSISTENT_EXCEPTIONS
2 #define STLPLUS_PERSISTENT_EXCEPTIONS
3 ////////////////////////////////////////////////////////////////////////////////
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
10 // Exceptions thrown by persistence routines
12 ////////////////////////////////////////////////////////////////////////////////
13 #include "persistence_fixes.hpp"
17 ////////////////////////////////////////////////////////////////////////////////
22 ////////////////////////////////////////////////////////////////////////////////
24 // exception thrown if you try to dump or restore an illegal polymorphic type
25 class persistent_illegal_type
: public std::logic_error
28 persistent_illegal_type(const std::string
& type
) throw();
29 persistent_illegal_type(unsigned key
) throw();
30 ~persistent_illegal_type(void) throw();
33 // exception thrown if a dump fails for any reason - but typically because the output stream couldn't take the data
34 class persistent_dump_failed
: public std::runtime_error
37 persistent_dump_failed(const std::string
& message
) throw();
38 ~persistent_dump_failed(void) throw();
41 // exception thrown if you try to restore from an out of date or unrecognised byte stream
42 class persistent_restore_failed
: public std::runtime_error
45 persistent_restore_failed(const std::string
& message
) throw();
46 ~persistent_restore_failed(void) throw();
49 ////////////////////////////////////////////////////////////////////////////////
51 } // end namespace stlplus