junrushao commented on issue #457:
URL: https://github.com/apache/tvm-ffi/issues/457#issuecomment-3917854068
**re double exception** this indeed could happen, but my understanding is
that `std::terminate` will be called during the 2nd exception in the cleanup of
the 1st (aka stack unwinding), which is well defined behavior. In our case, if
we are deleting a range of Anys, `std::terminate` should be called upon the
second exception:
```
current_exception = None
for i in anys:
try:
destruct(i)
except e:
if curent_exception is None:
current_exception = e
else:
std::terminiate # can't handle the 2nd exception
if current_exception is not None:
throw current_exception
```
** noexcept deleter**. While generally it's something to avoid in C++,
modern C++ compilers do properly handle those corner cases..Is this a
convention in TVM-FFI that we disallow exceptions in deleters? If so, we should
get this well-documented
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]