>
> You're right. new_exception does surprising things. If it gets an exception during the call, it returns a handle to that exception, which is not what I want at all. I'll return null in that case.
From [~dholmes]:
I have to wonder whether `new_exceptions`'s behaviour is what anyone would want! It could lead to some very strange exceptions being thrown - see for example `ConstantPool::throw_resolution_error` where it can throw a resolution error with the wrong cause!
I expected new_exception to have a TRAPS in case the constructor call fails or an it gets an OOM allocating the exception, but that exception shouldn't be returned instead of the original exception.
Need to write some tests for this.
> You're right. new_exception does surprising things. If it gets an exception during the call, it returns a handle to that exception, which is not what I want at all. I'll return null in that case.
From [~dholmes]:
I have to wonder whether `new_exceptions`'s behaviour is what anyone would want! It could lead to some very strange exceptions being thrown - see for example `ConstantPool::throw_resolution_error` where it can throw a resolution error with the wrong cause!
I expected new_exception to have a TRAPS in case the constructor call fails or an it gets an OOM allocating the exception, but that exception shouldn't be returned instead of the original exception.
Need to write some tests for this.
- relates to
-
JDK-8317294 Classloading throws exceptions over already pending exceptions
-
- Resolved
-