mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 01:27:12 +00:00
Catch exceptions by reference (by convention), based on patch from Markus, refs #1852
This was SVN commit r13421.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -193,7 +193,7 @@ JSBool JSI_IGUIObject::getProperty(JSContext* cx, JSObject* obj, jsid id, jsval*
|
||||
P(percent, bottom, rbottom);
|
||||
#undef P
|
||||
}
|
||||
catch (PSERROR_Scripting_ConversionFailed)
|
||||
catch (PSERROR_Scripting_ConversionFailed&)
|
||||
{
|
||||
debug_warn(L"Error creating size object!");
|
||||
break;
|
||||
@@ -670,7 +670,7 @@ JSBool JSI_IGUIObject::getComputedSize(JSContext* cx, uintN argc, jsval* vp)
|
||||
g_ScriptingHost.SetObjectProperty_Double(obj, "top", size.top);
|
||||
g_ScriptingHost.SetObjectProperty_Double(obj, "bottom", size.bottom);
|
||||
}
|
||||
catch (PSERROR_Scripting_ConversionFailed)
|
||||
catch (PSERROR_Scripting_ConversionFailed&)
|
||||
{
|
||||
debug_warn(L"Error creating size object!");
|
||||
return JS_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user