log exceptions

This commit is contained in:
Dima Granetchi
2017-02-13 19:35:35 +02:00
parent 5294568a72
commit cb3070b853
+2 -2
View File
@@ -133,7 +133,7 @@ class BindxExtMacro {
case _: case _:
macro if (!init) { macro if (!init) {
var v:Null < $type > = null; var v:Null < $type > = null;
try { v = $expr; } catch (e:Dynamic) { }; try { v = $expr; } catch (e:Dynamic) { trace(e); };
$i { zeroListener } ($i { zeroValue }, v); $i { zeroListener } ($i { zeroValue }, v);
$i { zeroValue } = v; $i { zeroValue } = v;
}; };
@@ -291,7 +291,7 @@ class BindxExtMacro {
if (field.params != null) { if (field.params != null) {
fieldListenerBody.unshift(macro $i { oldValue } = n); fieldListenerBody.unshift(macro $i { oldValue } = n);
fieldListenerBody.unshift(macro var n:Null<$type> = try { $e; } catch (_:Dynamic) { null; }); fieldListenerBody.unshift(macro var n:Null<$type> = try { $e; } catch (e:Dynamic) { trace(e); null; });
fieldListenerBody.unshift(macro var o:Null<$type> = $i{oldValue} ); fieldListenerBody.unshift(macro var o:Null<$type> = $i{oldValue} );
res.init.push(macro var $oldValue:Null<$type> = null); res.init.push(macro var $oldValue:Null<$type> = null);