X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fpersistence%2Fpersistent_exceptions.cpp;fp=src%2Fstlplus%2Fpersistence%2Fpersistent_exceptions.cpp;h=0000000000000000000000000000000000000000;hb=5846afb00833cc72fe72422ca896d2387c712cb4;hp=d2338261c64a62938873ffbe78f61cbf113cd299;hpb=a97500609dc3c1b11f9786d32bc458eb00de4c36;p=chaz%2Fyoink diff --git a/src/stlplus/persistence/persistent_exceptions.cpp b/src/stlplus/persistence/persistent_exceptions.cpp deleted file mode 100644 index d233826..0000000 --- a/src/stlplus/persistence/persistent_exceptions.cpp +++ /dev/null @@ -1,64 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// - -// Author: Andy Rushton -// Copyright: (c) Southampton University 1999-2004 -// (c) Andy Rushton 2004-2009 -// License: BSD License, see ../docs/license.html - -//////////////////////////////////////////////////////////////////////////////// - -#include "persistent_exceptions.hpp" -#include - -//////////////////////////////////////////////////////////////////////////////// - -static std::string to_string(int number) -{ - // use sprintf in a very controlled way that cannot overrun - char* buffer = new char[50]; - sprintf(buffer, "%i", number); - std::string result = buffer; - delete buffer; - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -// exceptions - -stlplus::persistent_illegal_type::persistent_illegal_type(const std::string& type) throw() : - std::logic_error(std::string("illegal type: ") + type) -{ -} - -stlplus::persistent_illegal_type::persistent_illegal_type(unsigned key) throw() : - std::logic_error(std::string("illegal key: ") + to_string((int)key)) -{ -} - -stlplus::persistent_illegal_type::~persistent_illegal_type(void) throw() -{ -} - -//////////////////////////////////////////////////////////////////////////////// - -stlplus::persistent_dump_failed::persistent_dump_failed(const std::string& message) throw() : - std::runtime_error(std::string("dump failed: ") + message) -{ -} - -stlplus::persistent_dump_failed::~persistent_dump_failed(void) throw() -{ -} - -//////////////////////////////////////////////////////////////////////////////// - -stlplus::persistent_restore_failed::persistent_restore_failed(const std::string& message) throw() : - std::runtime_error(std::string("restore failed: ") + message) -{ -} - -stlplus::persistent_restore_failed::~persistent_restore_failed(void) throw() -{ -} - -////////////////////////////////////////////////////////////////////////////////