From d5b557706a497b55c0127e2583cd385fd722d5fd Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Thu, 18 Dec 2014 13:14:12 +0300 Subject: [PATCH] Use correct exception SDL2pp::Exception doesn't is not suitable here as this is not an SDL error. Incorrect argument is a logic error. --- SDL2pp/ExtraRWops.hh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SDL2pp/ExtraRWops.hh b/SDL2pp/ExtraRWops.hh index e680a86..ef13e77 100644 --- a/SDL2pp/ExtraRWops.hh +++ b/SDL2pp/ExtraRWops.hh @@ -23,7 +23,8 @@ #define SDL2PP_EXTRARWOPS_HH #include -#include + +#include namespace SDL2pp { @@ -54,7 +55,7 @@ public: position_ = container_.size() + offset; break; default: - throw Exception("Unexpected whence value for WritableMemRWops::Seek"); + throw std::logic_error("Unexpected whence value for ContainerRWops::Seek"); } return position_; } @@ -115,7 +116,7 @@ public: position_ = container_.size() + offset; break; default: - throw Exception("Unexpected whence value for WritableMemRWops::Seek"); + throw std::logic_error("Unexpected whence value for ConstContainerRWops::Seek"); } return position_; }