mirror of
https://github.com/edubart/otclient.git
synced 2025-12-25 09:17:11 +01:00
rewrite and reoganize tools functions
* create stdext namespace which contains additional C++ algorithms * organize stdext in string, math, cast and exception utilities
This commit is contained in:
@@ -41,11 +41,11 @@ ImagePtr Image::load(const std::string& file)
|
||||
try {
|
||||
// currently only png images are supported
|
||||
if(!boost::ends_with(file, ".png"))
|
||||
Fw::throwException("image file format no supported");
|
||||
stdext::throw_exception("image file format no supported");
|
||||
|
||||
// load image file data
|
||||
image = loadPNG(file);
|
||||
} catch(Exception& e) {
|
||||
} catch(stdext::exception& e) {
|
||||
logError("unable to load image '", file, "': ", e.what());
|
||||
}
|
||||
return image;
|
||||
|
||||
Reference in New Issue
Block a user