< prev index next >

src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java

Print this page

        

*** 452,462 **** } startLocalManagementAgent(); } } catch (AgentConfigurationError e) { ! error(e.getError(), e.getParams()); } catch (Exception e) { error(e); } } --- 452,462 ---- } startLocalManagementAgent(); } } catch (AgentConfigurationError e) { ! error(e); } catch (Exception e) { error(e); } }
*** 688,697 **** --- 688,714 ---- e.printStackTrace(); System.err.println(getText(AGENT_EXCEPTION) + ": " + e.toString()); throw new RuntimeException(e); } + public static void error(AgentConfigurationError e) { + String keyText = getText(e.getError()); + String[] params = e.getParams(); + + System.err.print(getText("agent.err.error") + ": " + keyText); + + if (params != null && params.length != 0) { + StringBuffer message = new StringBuffer(params[0]); + for (int i = 1; i < params.length; i++) { + message.append(" " + params[i]); + } + System.err.println(": " + message); + } + e.printStackTrace(); + throw new RuntimeException(e); + } + public static void warning(String key, String message) { System.err.print(getText("agent.err.warning") + ": " + getText(key)); System.err.println(": " + message); }
< prev index next >