Catch not just the generic utf8 exception, but a few specific ones as well (bug #244)

This commit is contained in:
Bart van Strien
2011-09-11 12:51:34 +02:00
parent c28659ae33
commit 96a5a3e402
+20
View File
@@ -174,6 +174,16 @@ namespace opengl
dx += glyph->spacing;
}
}
catch (utf8::invalid_code_point e)
{
glPopMatrix();
throw love::Exception(e.what());
}
catch (utf8::invalid_utf8 e)
{
glPopMatrix();
throw love::Exception(e.what());
}
catch (utf8::exception e)
{
glPopMatrix();
@@ -210,6 +220,16 @@ namespace opengl
temp += static_cast<int>(g->spacing * mSpacing);
}
}
catch (utf8::invalid_code_point e)
{
glPopMatrix();
throw love::Exception(e.what());
}
catch (utf8::invalid_utf8 e)
{
glPopMatrix();
throw love::Exception(e.what());
}
catch (utf8::exception e)
{
throw love::Exception(e.what());