Some exception cleanup

This commit is contained in:
Bart van Strien
2011-09-11 22:55:34 +02:00
parent 8f9a4ef15d
commit dc873c24f0
4 changed files with 12 additions and 25 deletions
+4 -24
View File
@@ -174,20 +174,10 @@ namespace opengl
dx += glyph->spacing;
}
}
catch (utf8::invalid_code_point e)
catch (utf8::exception & e)
{
glPopMatrix();
throw love::Exception(e.what());
}
catch (utf8::invalid_utf8 e)
{
glPopMatrix();
throw love::Exception(e.what());
}
catch (utf8::exception e)
{
glPopMatrix();
throw love::Exception(e.what());
throw love::Exception(1, e.what());
}
glPopMatrix();
}
@@ -220,19 +210,9 @@ namespace opengl
temp += static_cast<int>(g->spacing * mSpacing);
}
}
catch (utf8::invalid_code_point e)
catch (utf8::exception & 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());
throw love::Exception(1, e.what());
}
return temp;