More attempted error handling

This was SVN commit r769.
This commit is contained in:
Ykkrosh
2004-07-17 17:09:33 +00:00
parent 1d44976b35
commit 1e40ed1543
17 changed files with 340 additions and 149 deletions
@@ -98,7 +98,7 @@ JSBool JSI_Vector3D::setProperty( JSContext* cx, JSObject* obj, jsval id, jsval*
case component_z: vectorData->Z = (float)g_ScriptingHost.ValueToDouble( *vp ); break;
}
}
catch (...)
catch (PSERROR_Scripting_ConversionFailed)
{
JS_ReportError(cx, "Invalid parameter value for Vector3D");
return( JS_FALSE );
@@ -126,7 +126,7 @@ JSBool JSI_Vector3D::construct( JSContext* cx, JSObject* obj, uintN argc, jsval*
JS_SetPrivate( cx, obj, new Vector3D_Info( x, y, z ) );
return( JS_TRUE );
}
catch (...)
catch (PSERROR_Scripting_ConversionFailed)
{
// Invalid input (i.e. can't be coerced into doubles) - fail
JS_ReportError( cx, "Invalid parameters to Vector3D constructor" );