On Wed, 21 Jan 2026 09:30:48 GMT, Alan Bateman <[email protected]> wrote:

>> Javadoc says IOException is:
>>> Signals that an I/O exception of some sort has occurred. This class is the 
>>> general class of exceptions produced by failed or interrupted I/O 
>>> operations.
>> 
>> I think MonitorException and URISyntaxException do not fit this description.
>> 
>> Is AttachOperationFailedException more appropriate? Javadoc says as 
>> following.
>>> This exception can be thrown by the various operations of 
>>> [VirtualMachine](https://docs.oracle.com/en/java/javase/25/docs/api/jdk.attach/com/sun/tools/attach/VirtualMachine.html)
>>>  when the operation fails in the target VM. If there is a communication 
>>> error, a regular IOException will be thrown.
>> 
>> AttachOperationFailedException inherits IOException, and case (2) and (4) 
>> can be considered attach operation error, not a communication error.
>
>> AttachOperationFailedException inherits IOException, and case (2) and (4) 
>> can be considered attach operation error, not a communication error.
> 
> That would be okay to throw, and would be okay to add a constructor that 
> takes a cause.
> 
> I think we should remove the new constructor from 
> AttachNotSupportedException, it should not be needed.

@AlanBateman 
I filed it and submit CSR on JBS, and sent PR as #29355. Let's keep discuss on 
it, and I hope you review it.

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

PR Comment: https://git.openjdk.org/jdk/pull/28867#issuecomment-3782224956

Reply via email to