mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Added exception catcher for love.graphics.newFont.
This commit is contained in:
@@ -207,7 +207,11 @@ namespace opengl
|
|||||||
{
|
{
|
||||||
// Check the value.
|
// Check the value.
|
||||||
love::filesystem::File * file = luax_checktype<love::filesystem::File>(L, 1, "File", FILESYSTEM_FILE_T);
|
love::filesystem::File * file = luax_checktype<love::filesystem::File>(L, 1, "File", FILESYSTEM_FILE_T);
|
||||||
d = file->read();
|
try {
|
||||||
|
d = file->read();
|
||||||
|
} catch (Exception & e) {
|
||||||
|
return luaL_error(L, e.what());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(luax_istype(L, 1, DATA_T))
|
else if(luax_istype(L, 1, DATA_T))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user