mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-14 00:13:46 +00:00
More attempted error handling
This was SVN commit r769.
This commit is contained in:
@@ -79,7 +79,7 @@ JSBool JSI_Entity::construct( JSContext* cx, JSObject* obj, unsigned int argc, j
|
||||
{
|
||||
templateName = g_ScriptingHost.ValueToString( argv[0] );
|
||||
}
|
||||
catch( ... )
|
||||
catch( PSERROR_Scripting_ConversionFailed )
|
||||
{
|
||||
*rval = JSVAL_NULL;
|
||||
return( JS_TRUE );
|
||||
@@ -100,7 +100,7 @@ JSBool JSI_Entity::construct( JSContext* cx, JSObject* obj, unsigned int argc, j
|
||||
{
|
||||
orientation = (float)g_ScriptingHost.ValueToDouble( argv[2] );
|
||||
}
|
||||
catch( ... )
|
||||
catch( PSERROR_Scripting_ConversionFailed )
|
||||
{
|
||||
orientation = 0.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user