/[classpath]/classpath/vm/reference/java/lang/Throwable.java
ViewVC logotype

Diff of /classpath/vm/reference/java/lang/Throwable.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by ericb, Sat Feb 23 09:19:52 2002 UTC revision 1.6 by ericb, Sun Feb 24 04:25:15 2002 UTC
# Line 258  public class Throwable extends Object im Line 258  public class Throwable extends Object im
258    }    }
259    
260    /**    /**
261     * Get a human-readable representation of this Throwable. With a null     * Get a human-readable representation of this Throwable. The detail message
262     * detail message, this string is simply the object's class name. With     * is retrieved by getLocalizedMessage().  Then, with a null detail
263     * a detail message, the string is     * message, this string is simply the object's class name; otherwise
264     * <code>getClass().getName() + ": " + getMessage()</code>.     * the string is <code>getClass().getName() + ": " + message</code>.
265     *     *
266     * @return a human-readable String represting this Throwable     * @return a human-readable String represting this Throwable
267     */     */
268    public String toString()    public String toString()
269    {    {
270      return getClass().getName()      String msg = getLocalizedMessage();
271        + (detailMessage == null ? "" : ": " + detailMessage);      return getClass().getName() + (msg == null ? "" : ": " + msg);
272    }    }
273    
274    /**    /**

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26