]> Dogcows Code - chaz/yoink/blob - src/stlplus/persistence/persistent_exceptions.hpp
testing new non-autotools build system
[chaz/yoink] / src / stlplus / persistence / persistent_exceptions.hpp
1 #ifndef STLPLUS_PERSISTENT_EXCEPTIONS
2 #define STLPLUS_PERSISTENT_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 // Exceptions thrown by persistence routines
11
12 ////////////////////////////////////////////////////////////////////////////////
13 #include "persistence_fixes.hpp"
14 #include <stdexcept>
15 #include <string>
16
17 ////////////////////////////////////////////////////////////////////////////////
18
19 namespace stlplus
20 {
21
22 ////////////////////////////////////////////////////////////////////////////////
23
24 // exception thrown if you try to dump or restore an illegal polymorphic type
25 class persistent_illegal_type : public std::logic_error
26 {
27 public:
28 persistent_illegal_type(const std::string& type) throw();
29 persistent_illegal_type(unsigned key) throw();
30 ~persistent_illegal_type(void) throw();
31 };
32
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
35 {
36 public:
37 persistent_dump_failed(const std::string& message) throw();
38 ~persistent_dump_failed(void) throw();
39 };
40
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
43 {
44 public:
45 persistent_restore_failed(const std::string& message) throw();
46 ~persistent_restore_failed(void) throw();
47 };
48
49 ////////////////////////////////////////////////////////////////////////////////
50
51 } // end namespace stlplus
52
53 #endif
This page took 0.030822 seconds and 4 git commands to generate.