From e30306f7c35240140ac83a0392ca617763cd3cc8 Mon Sep 17 00:00:00 2001 From: Nicolay Korslund Date: Thu, 2 Sep 2010 22:30:39 +0200 Subject: [PATCH] Removed redundant custom exception class --- components/bsa/bsa_file.cpp | 4 ++-- components/esm/esm_reader.hpp | 4 ++-- components/esm_store/cell_store.hpp | 7 +++---- components/misc/slice_array.hpp | 2 ++ components/nif/nif_file.hpp | 4 ++-- libs/mangle | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/components/bsa/bsa_file.cpp b/components/bsa/bsa_file.cpp index acd63a4bc4..e37d38bb2d 100644 --- a/components/bsa/bsa_file.cpp +++ b/components/bsa/bsa_file.cpp @@ -25,8 +25,8 @@ #include #include -#include +#include #include #include @@ -36,7 +36,7 @@ using namespace Mangle::Stream; /// Error handling 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 diff --git a/components/esm/esm_reader.hpp b/components/esm/esm_reader.hpp index 6e214e1bd7..76df4b5dc9 100644 --- a/components/esm/esm_reader.hpp +++ b/components/esm/esm_reader.hpp @@ -7,10 +7,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -626,7 +626,7 @@ public: ss << "\n Subrecord: " << c.subName.toString(); if(esm != NULL) ss << "\n Offset: 0x" << hex << esm->tell(); - throw str_exception(ss.str()); + throw std::runtime_error(ss.str()); } private: diff --git a/components/esm_store/cell_store.hpp b/components/esm_store/cell_store.hpp index d4d7cc2f83..a150ec3d38 100644 --- a/components/esm_store/cell_store.hpp +++ b/components/esm_store/cell_store.hpp @@ -13,11 +13,10 @@ #include "store.hpp" #include "components/esm/records.hpp" #include "components/esm/loadcell.hpp" -#include #include #include -#include "libs/mangle/tools/str_exception.hpp" +#include namespace ESMS { @@ -55,7 +54,7 @@ namespace ESMS { const X* obj = recList.find(ref.refID); if(obj == NULL) - throw str_exception("Error resolving cell reference " + ref.refID); + throw std::runtime_error("Error resolving cell reference " + ref.refID); LiveRef lr; lr.ref = ref; @@ -116,7 +115,7 @@ namespace ESMS cell = store.cells.findInt(name); if(cell == NULL) - throw str_exception("Cell not found - " + name); + throw std::runtime_error("Cell not found - " + name); loadRefs(store, esm); } diff --git a/components/misc/slice_array.hpp b/components/misc/slice_array.hpp index 4dde8143b2..f7e2ffeffb 100644 --- a/components/misc/slice_array.hpp +++ b/components/misc/slice_array.hpp @@ -27,6 +27,8 @@ // A simple array implementation containing a pointer and a // length. Used for holding slices into a data buffer. #include +#include + template struct SliceArray { diff --git a/components/nif/nif_file.hpp b/components/nif/nif_file.hpp index 72fb7c4b6a..ebf1fe4a45 100644 --- a/components/nif/nif_file.hpp +++ b/components/nif/nif_file.hpp @@ -26,9 +26,9 @@ #include #include -#include #include +#include #include #include #include @@ -69,7 +69,7 @@ class NIFFile { std::string err = "NIFFile Error: " + msg; err += "\nFile: " + filename; - throw str_exception(err); + throw std::runtime_error(err); } /// Open a NIF stream. The name is used for error messages. diff --git a/libs/mangle b/libs/mangle index 2407f21c47..053074babb 160000 --- a/libs/mangle +++ b/libs/mangle @@ -1 +1 @@ -Subproject commit 2407f21c47abe218b9347df0fc9e8e9aebc02e3f +Subproject commit 053074babb1445993ec40f72f60755de8d8ee5b7