jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java
changeset 45004 ea3137042a61
parent 40685 e6f3a9fff607
equal deleted inserted replaced
44789:73fd39e0702e 45004:ea3137042a61
   212             }
   212             }
   213 
   213 
   214             // Special-case the "load" command so that the right exception is
   214             // Special-case the "load" command so that the right exception is
   215             // thrown.
   215             // thrown.
   216             if (cmd.equals("load")) {
   216             if (cmd.equals("load")) {
   217                 throw new AgentLoadException("Failed to load agent library");
   217                 String msg = "Failed to load agent library";
       
   218                 if (!message.isEmpty())
       
   219                     msg += ": " + message;
       
   220                 throw new AgentLoadException(msg);
   218             } else {
   221             } else {
   219                 if (message == null) {
   222                 if (message.isEmpty())
   220                     throw new AttachOperationFailedException("Command failed in target VM");
   223                     message = "Command failed in target VM";
   221                 } else {
   224                 throw new AttachOperationFailedException(message);
   222                     throw new AttachOperationFailedException(message);
       
   223                 }
       
   224             }
   225             }
   225         }
   226         }
   226 
   227 
   227         // Return the input stream so that the command output can be read
   228         // Return the input stream so that the command output can be read
   228         return sis;
   229         return sis;