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 Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default Re: exception handling

    What were your observations when you tried them?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Exception Handling
    By Bicentric in forum New To Java
    Replies: 1
    Last Post: 07-22-2012, 10:37 PM
  2. exception handling
    By niksipandit in forum New To Java
    Replies: 3
    Last Post: 09-22-2011, 03:25 PM
  3. Exception handling
    By herat in forum New To Java
    Replies: 1
    Last Post: 06-21-2011, 11:13 AM
  4. Exception Handling
    By link6790 in forum New To Java
    Replies: 16
    Last Post: 05-19-2011, 07:57 PM
  5. Exception Handling
    By eLancaster in forum New To Java
    Replies: 4
    Last Post: 02-20-2011, 01: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
  •