diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-03-28 23:59:10 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-03-28 23:59:10 (GMT) |
| commit | 1f388e4ca02f0a84e4b9d9b19e6308224389818d (patch) | |
| tree | 3cb5d7caf052d57e6873a291bbe451a4119bdcef /src/game/SaveLoadException.h | |
| parent | e9770d8ee7a44d5680c23749c786a03c0d5b41ff (diff) | |
| download | powder-1f388e4ca02f0a84e4b9d9b19e6308224389818d.zip powder-1f388e4ca02f0a84e4b9d9b19e6308224389818d.tar.gz | |
Exception when loading invalid save
Diffstat (limited to 'src/game/SaveLoadException.h')
| -rw-r--r-- | src/game/SaveLoadException.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/game/SaveLoadException.h b/src/game/SaveLoadException.h new file mode 100644 index 0000000..fea2ad5 --- /dev/null +++ b/src/game/SaveLoadException.h @@ -0,0 +1,26 @@ +/* + * SaveLoadException.h + * + * Created on: Mar 29, 2012 + * Author: Simon + */ + +#ifndef SAVELOADEXCEPTION_H_ +#define SAVELOADEXCEPTION_H_ + +#include <string> +#include <exception> +using namespace std; + +struct SaveLoadException: public exception { + string message; +public: + SaveLoadException(string message_): message(message_) {} + const char * what() const throw() + { + return message.c_str(); + } + ~SaveLoadException() throw() {}; +}; + +#endif /* SAVELOADEXCEPTION_H_ */ |
