Skip to content

Commit 6c9d458

Browse files
author
Antonio Cueva
committed
Catch number conversion exception
1 parent 4d04043 commit 6c9d458

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ui/core/view.android.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ var OWNER = "_owner";
1616

1717
function onIdPropertyChanged(data: dependencyObservable.PropertyChangeData) {
1818
var view = <View>data.object;
19-
view._nativeView.setTag(data.newValue);
19+
//HACK to catch number conversion exception
20+
try {
21+
view._nativeView.setTag(data.newValue);
22+
}
23+
catch (e) {
24+
console.log("error is " + e);
25+
}
26+
//HACK ends here
2027
}
2128
(<proxy.PropertyMetadata>viewCommon.View.idProperty.metadata).onSetNativeValue = onIdPropertyChanged;
2229

0 commit comments

Comments
 (0)