Remove an exception not used for anything useful

This commit is contained in:
Thomas Goyne 2014-06-27 15:55:05 -07:00
parent b7a8dea753
commit c9608ab610
4 changed files with 5 additions and 7 deletions

View File

@ -22,6 +22,7 @@
#include "libaegisub/cajun/writer.h"
#include "libaegisub/cajun/elements.h"
#include "libaegisub/exception.h"
#include "libaegisub/fs.h"
#include "libaegisub/io.h"
#include "libaegisub/log.h"
@ -114,7 +115,7 @@ OptionValue* Options::Get(const std::string &name) {
return index->second.get();
LOG_E("option/get") << "agi::Options::Get Option not found: (" << name << ")";
throw OptionErrorNotFound("Option value not found: " + name);
throw agi::InternalError("Option value not found: " + name);
}
void Options::Flush() const {

View File

@ -21,6 +21,8 @@
#include "libaegisub/cajun/elements.h"
#include "libaegisub/cajun/visitor.h"
#include "libaegisub/exception.h"
#include <memory>
namespace agi {

View File

@ -23,7 +23,6 @@
#include <map>
#include <memory>
#include <libaegisub/exception.h>
#include <libaegisub/fs_fwd.h>
namespace json {
@ -32,10 +31,6 @@ namespace json {
}
namespace agi {
DEFINE_EXCEPTION(OptionError, Exception);
DEFINE_EXCEPTION(OptionErrorNotFound, OptionError);
class OptionValue;
using OptionValueMap = std::map<std::string, std::unique_ptr<OptionValue>>;

View File

@ -49,7 +49,7 @@ TEST_F(lagi_option, get_existing_option) {
TEST_F(lagi_option, get_nonexistant_option) {
agi::Options opt(conf_ok, default_opt, agi::Options::FLUSH_SKIP);
EXPECT_THROW(opt.Get("Nonexistant option"), agi::OptionErrorNotFound);
EXPECT_THROW(opt.Get("Nonexistant option"), agi::InternalError);
}
TEST_F(lagi_option, flush_skip) {