[GitHub] piiswrong commented on issue #9681: Better Exception Handling for Operators

2018-02-06 Thread GitBox
piiswrong commented on issue #9681: Better Exception Handling for Operators
URL: https://github.com/apache/incubator-mxnet/pull/9681#issuecomment-363515561
 
 
   What I meant is, for example:
   ```
   try:
  x, y, z = op()
  x.asnumpy()
   except:
  handle_exc()
   y.asnumpy()  # Fail
   ```
   Currently y.asnumpy() will fail again with the same error as x.asnumpy().
   But a single exception shouldn't be raised twice


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on issue #9681: Better Exception Handling for Operators

2018-02-05 Thread GitBox
piiswrong commented on issue #9681: Better Exception Handling for Operators
URL: https://github.com/apache/incubator-mxnet/pull/9681#issuecomment-363190218
 
 
   suppose and operator has three outputs x, y and z and it raises an exception.
   then x.asnumpy() would raise an error.
   Then y.asnumpy() would raise the same error again.
   
   I think an error should only be raised once. After it's raised, it should be 
cleared from all arrays that is pointing to that error.
   
   This can be achieved by setting the object referenced by exception_ptr to an 
invalid value


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services