On 14 apr 2014, at 17:17, Alan Bateman <[email protected]> wrote:

> On 03/04/2014 15:23, Staffan Larsen wrote:
>> All,
>> 
>> In the attach framework, the result is sent back to the attaching process as 
>> a stream. The first value in the stream is an integer that is interpreted as 
>> the completion status. For successful operations, this value is 0. In that 
>> case the attaching process continues to read output from the stream and 
>> displays that as the result of the operation.
>> 
>> When the completion status signals an error, the rest of the stream output 
>> is ignored. This means that there is currently no way for an attach 
>> operation to signal an error and provide an error message.
>> 
>> :
>> 
>> At a later stage, I am planning to change the hotspot code so that 
>> exceptions in Diagnostic Commands actually set the completion status to an 
>> error. Today, the completation status is set to success, just because we 
>> want the error message to propagate.
>> 
>> bug: https://bugs.openjdk.java.net/browse/JDK-8039173
>> webrev: http://cr.openjdk.java.net/~sla/8039173/webrev.00/
>> 
> For someone looking at the Virtualmachine API then I don't think the javadoc 
> is clear enough to understand when one might get the specific 
> AttachOperationFailedException vs. the more general IOException. I think it 
> means that there was communication with the target VM but that the operation 
> failed for some reason but I don't think this will be obvious to the reader.

I have tried to clarify the wording in the javadoc. Suggestions for 
improvements are welcome.

> 
> For the new exception then it would be good to add @since and also a 
> copyright header.

Fixed.

new webrev: http://cr.openjdk.java.net/~sla/8039173/webrev.04/

Thanks,
/Staffan

> 
> Sorry I don't have time to look at the implementation at this time.
> 
> -Alan.
> 

Reply via email to