+++ /dev/null
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-// Author: Andy Rushton\r
-// Copyright: (c) Southampton University 1999-2004\r
-// (c) Andy Rushton 2004-2009\r
-// License: BSD License, see ../docs/license.html\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-#include "persistent_exceptions.hpp"\r
-#include <stdio.h>\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-static std::string to_string(int number)\r
-{\r
- // use sprintf in a very controlled way that cannot overrun\r
- char* buffer = new char[50];\r
- sprintf(buffer, "%i", number);\r
- std::string result = buffer;\r
- delete buffer;\r
- return result;\r
-}\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-// exceptions\r
-\r
-stlplus::persistent_illegal_type::persistent_illegal_type(const std::string& type) throw() : \r
- std::logic_error(std::string("illegal type: ") + type)\r
-{\r
-}\r
-\r
-stlplus::persistent_illegal_type::persistent_illegal_type(unsigned key) throw() : \r
- std::logic_error(std::string("illegal key: ") + to_string((int)key))\r
-{\r
-}\r
-\r
-stlplus::persistent_illegal_type::~persistent_illegal_type(void) throw()\r
-{\r
-}\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-stlplus::persistent_dump_failed::persistent_dump_failed(const std::string& message) throw() :\r
- std::runtime_error(std::string("dump failed: ") + message)\r
-{\r
-}\r
-\r
-stlplus::persistent_dump_failed::~persistent_dump_failed(void) throw()\r
-{\r
-}\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-stlplus::persistent_restore_failed::persistent_restore_failed(const std::string& message) throw() :\r
- std::runtime_error(std::string("restore failed: ") + message)\r
-{\r
-}\r
-\r
-stlplus::persistent_restore_failed::~persistent_restore_failed(void) throw()\r
-{\r
-}\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r