Results 1 to 2 of 2
  1. #1
    Elaforestis is offline Member
    Join Date
    Oct 2012
    Posts
    11
    Rep Power
    0

    Default exception handling

    Hey guys,

    i was wondering what is the difference between

    exception.printStackTrace();

    throw exception;

    exception.getMessage();

    I am guessing the last one returns a string of the exception and doesnt actually throw it, what about the other 2 though?

    Thanks for your time!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,937
    Rep Power
    16

    Default Re: exception handling

    What were your observations when you tried them?

    db
    Why do they call it rush hour when nothing moves? - Robin Williams

Similar Threads

  1. Exception Handling
    By Bicentric in forum New To Java
    Replies: 1
    Last Post: 07-22-2012, 09:37 PM
  2. exception handling
    By niksipandit in forum New To Java
    Replies: 3
    Last Post: 09-22-2011, 02:25 PM
  3. Exception handling
    By herat in forum New To Java
    Replies: 1
    Last Post: 06-21-2011, 10:13 AM
  4. Exception Handling
    By link6790 in forum New To Java
    Replies: 16
    Last Post: 05-19-2011, 06:57 PM
  5. Exception Handling
    By eLancaster in forum New To Java
    Replies: 4
    Last Post: 02-20-2011, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •