Removed redundant custom exception class

actorid
Nicolay Korslund 15 years ago
parent c5d3a40fde
commit e30306f7c3

@ -25,8 +25,8 @@
#include <libs/mangle/stream/servers/file_stream.hpp> #include <libs/mangle/stream/servers/file_stream.hpp>
#include <libs/mangle/stream/filters/slice_stream.hpp> #include <libs/mangle/stream/filters/slice_stream.hpp>
#include <libs/mangle/tools/str_exception.hpp>
#include <stdexcept>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
@ -36,7 +36,7 @@ using namespace Mangle::Stream;
/// Error handling /// Error handling
void BSAFile::fail(const string &msg) void BSAFile::fail(const string &msg)
{ {
throw str_exception("BSA Error: " + msg + "\nArchive: " + filename); throw std::runtime_error("BSA Error: " + msg + "\nArchive: " + filename);
} }
/// Read header information from the input source /// Read header information from the input source

@ -7,10 +7,10 @@
#include <vector> #include <vector>
#include <sstream> #include <sstream>
#include <string.h> #include <string.h>
#include <stdexcept>
#include <libs/mangle/stream/stream.hpp> #include <libs/mangle/stream/stream.hpp>
#include <libs/mangle/stream/servers/file_stream.hpp> #include <libs/mangle/stream/servers/file_stream.hpp>
#include <libs/mangle/tools/str_exception.hpp>
#include <components/misc/stringops.hpp> #include <components/misc/stringops.hpp>
#include <components/to_utf8/to_utf8.hpp> #include <components/to_utf8/to_utf8.hpp>
@ -626,7 +626,7 @@ public:
ss << "\n Subrecord: " << c.subName.toString(); ss << "\n Subrecord: " << c.subName.toString();
if(esm != NULL) if(esm != NULL)
ss << "\n Offset: 0x" << hex << esm->tell(); ss << "\n Offset: 0x" << hex << esm->tell();
throw str_exception(ss.str()); throw std::runtime_error(ss.str());
} }
private: private:

@ -13,11 +13,10 @@
#include "store.hpp" #include "store.hpp"
#include "components/esm/records.hpp" #include "components/esm/records.hpp"
#include "components/esm/loadcell.hpp" #include "components/esm/loadcell.hpp"
#include <libs/mangle/tools/str_exception.hpp>
#include <list> #include <list>
#include <iostream> #include <iostream>
#include "libs/mangle/tools/str_exception.hpp" #include <stdexcept>
namespace ESMS namespace ESMS
{ {
@ -55,7 +54,7 @@ namespace ESMS
{ {
const X* obj = recList.find(ref.refID); const X* obj = recList.find(ref.refID);
if(obj == NULL) if(obj == NULL)
throw str_exception("Error resolving cell reference " + ref.refID); throw std::runtime_error("Error resolving cell reference " + ref.refID);
LiveRef lr; LiveRef lr;
lr.ref = ref; lr.ref = ref;
@ -116,7 +115,7 @@ namespace ESMS
cell = store.cells.findInt(name); cell = store.cells.findInt(name);
if(cell == NULL) if(cell == NULL)
throw str_exception("Cell not found - " + name); throw std::runtime_error("Cell not found - " + name);
loadRefs(store, esm); loadRefs(store, esm);
} }

@ -27,6 +27,8 @@
// A simple array implementation containing a pointer and a // A simple array implementation containing a pointer and a
// length. Used for holding slices into a data buffer. // length. Used for holding slices into a data buffer.
#include <string.h> #include <string.h>
#include <string>
template <class T> template <class T>
struct SliceArray struct SliceArray
{ {

@ -26,9 +26,9 @@
#include <libs/mangle/stream/stream.hpp> #include <libs/mangle/stream/stream.hpp>
#include <libs/mangle/stream/filters/buffer_stream.hpp> #include <libs/mangle/stream/filters/buffer_stream.hpp>
#include <libs/mangle/tools/str_exception.hpp>
#include <components/misc/slice_array.hpp> #include <components/misc/slice_array.hpp>
#include <stdexcept>
#include <vector> #include <vector>
#include <string> #include <string>
#include <assert.h> #include <assert.h>
@ -69,7 +69,7 @@ class NIFFile
{ {
std::string err = "NIFFile Error: " + msg; std::string err = "NIFFile Error: " + msg;
err += "\nFile: " + filename; err += "\nFile: " + filename;
throw str_exception(err); throw std::runtime_error(err);
} }
/// Open a NIF stream. The name is used for error messages. /// Open a NIF stream. The name is used for error messages.

@ -1 +1 @@
Subproject commit 2407f21c47abe218b9347df0fc9e8e9aebc02e3f Subproject commit 053074babb1445993ec40f72f60755de8d8ee5b7
Loading…
Cancel
Save