mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-09-08 06:48:56 -04:00
Use correct exception
SDL2pp::Exception doesn't is not suitable here as this is not an SDL error. Incorrect argument is a logic error.
This commit is contained in:
parent
46591a9cbf
commit
d5b557706a
@ -23,7 +23,8 @@
|
||||
#define SDL2PP_EXTRARWOPS_HH
|
||||
|
||||
#include <SDL2pp/RWops.hh>
|
||||
#include <SDL2pp/Exception.hh>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
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_;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user