mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Catch exceptions thrown while encoding image data (issue #282)
This commit is contained in:
@@ -157,7 +157,14 @@ namespace image
|
||||
}
|
||||
ImageData::Format format;
|
||||
ImageData::getConstant(fmt, format);
|
||||
t->encode(file, format);
|
||||
try
|
||||
{
|
||||
t->encode(file, format);
|
||||
}
|
||||
catch (love::Exception & e)
|
||||
{
|
||||
return luaL_error(L, e.what());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user