make mxerr more robust
This commit is contained in:
parent
21775f8c89
commit
f230b7cebf
|
@ -105,6 +105,7 @@ macro mxerr(stk, ex)
|
|||
catch e
|
||||
(isa(e, mx.MXError) && (node = errnode(e)) != nothing) || rethrow()
|
||||
stk = $(esc(stk))
|
||||
haskey(stk, node) || rethrow()
|
||||
throw(Exception(e, totrace(stk[node])))
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -25,6 +25,7 @@ end
|
|||
e = try mxnet(model, (10, 1))
|
||||
catch e e end
|
||||
|
||||
@test isa(e, DataFlow.Interpreter.Exception)
|
||||
@test e.trace[1].func == Symbol("Flux.Affine")
|
||||
@test e.trace[2].func == :TLP
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue