On Tue, 6 Sep 2022 08:04:07 GMT, Rémi Forax <fo...@openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - allStop field and stopCheck method moved to synthetic REPL.$Cancel$
>>  - Revert "alternative implementation where instrumented code is directly 
>> checking Thread::interrupted"
>>    
>>    This reverts commit 0f0e0dd17c121955e7806073bb8cc78da1f133ea.
>
> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java 
> line 200:
> 
>> 198:                 allStop.set(null, true);
>> 199:             } catch (IllegalArgumentException| IllegalAccessException 
>> ex) {
>> 200:                 throw new InternalException(ex.getMessage());
> 
> to avoid to drop the stack trace of the original exception, it's better to 
> chain the exceptions,
> 
>   throw (InternalException) new InternalException().initCause(ex);

I just followed similar pattern as in other 9 cases of throwing new 
InternalException in idk.jshell.

-------------

PR: https://git.openjdk.org/jdk/pull/10166

Reply via email to