This repository was archived by the owner on Feb 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ObjectUtils call to object's fromNative now wrapped in a try/catch
- Loading branch information
Malachi Griffie
committed
Mar 5, 2014
1 parent
621a43a
commit be02fae
Showing
1 changed file
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Copyright 2011 Malachi Griffie <[email protected]> | ||
// | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
@@ -13,7 +13,7 @@ import nexus.utils.reflection.*; | |
|
||
/** | ||
* ... | ||
* | ||
* | ||
*/ | ||
public class ObjectUtils | ||
{ | ||
|
@@ -66,7 +66,14 @@ public class ObjectUtils | |
&& methodInfo.parameters.length == 1 | ||
&& methodInfo.parameters[0].type == Object) | ||
{ | ||
result = methodInfo.invoke(type, source); | ||
try | ||
{ | ||
result = methodInfo.invoke(type, source); | ||
} | ||
catch(e:Error) | ||
{ | ||
trace(e); | ||
} | ||
} | ||
else | ||
{ | ||
|
@@ -78,6 +85,7 @@ public class ObjectUtils | |
catch(e:Error) | ||
{ | ||
//probably because ctor requires arguments, if we add support for that then this can catch more interesting errors | ||
trace(e); | ||
} | ||
} | ||
|
||
|
@@ -160,6 +168,7 @@ public class ObjectUtils | |
catch(e:Error) | ||
{ | ||
//TODO: is a catch-all here ok? | ||
trace(e); | ||
} | ||
} | ||
else | ||
|