Removed redundant custom exception class

pull/9/head
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/filters/slice_stream.hpp>
#include <libs/mangle/tools/str_exception.hpp>
#include <stdexcept>
#include <stdlib.h>
#include <assert.h>
@ -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

@ -7,10 +7,10 @@
#include <vector>
#include <sstream>
#include <string.h>
#include <stdexcept>
#include <libs/mangle/stream/stream.hpp>
#include <libs/mangle/stream/servers/file_stream.hpp>
#include <libs/mangle/tools/str_exception.hpp>
#include <components/misc/stringops.hpp>
#include <components/to_utf8/to_utf8.hpp>
@ -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:

@ -13,11 +13,10 @@
#include "store.hpp"
#include "components/esm/records.hpp"
#include "components/esm/loadcell.hpp"
#include <libs/mangle/tools/str_exception.hpp>
#include <list>
#include <iostream>
#include "libs/mangle/tools/str_exception.hpp"
#include <stdexcept>
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);
}

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

@ -26,9 +26,9 @@
#include <libs/mangle/stream/stream.hpp>
#include <libs/mangle/stream/filters/buffer_stream.hpp>
#include <libs/mangle/tools/str_exception.hpp>
#include <components/misc/slice_array.hpp>
#include <stdexcept>
#include <vector>
#include <string>
#include <assert.h>
@ -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.

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