View Poll Results: Interesting?

Voters
2. You may not vote on this poll
  • Yes

    0 0%
  • No

    2 100.00%
Results 1 to 3 of 3
  1. #1
    joms999 is offline Member
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    0

    Default Creating your own exception

    Hello

    I just want ask my solution for my problem in java

    I want to create a new/own exception entitled "IncompleteStudentDataException". But, I don't know how to do it
    (The exception is for encountering a blank line on the students.dat, and skips it)

    Then apply it to a StudentReader.java

    I've attached a file here so you'll know what I'm talking about...

    Could you help me?... Thank you... :D
    Attached Files Attached Files

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,447
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by joms999 View Post
    Hello

    I just want ask my solution for my problem in java

    I want to create a new/own exception entitled "IncompleteStudentDataException". But, I don't know how to do it
    (The exception is for encountering a blank line on the students.dat, and skips it)

    Then apply it to a StudentReader.java

    I've attached a file here so you'll know what I'm talking about...

    Could you help me?... Thank you... :D
    Make your exception extend from the RuntimeException class if you want it to be an unchecked exception, otherwise extend from the Exception class. That's all there is to it and you can throw (or catch) that exception.

    kind regards,

    Jos

Similar Threads

  1. Replies: 4
    Last Post: 10-25-2010, 07:42 PM
  2. Creating files stopped creating...
    By Dieter in forum Advanced Java
    Replies: 3
    Last Post: 09-25-2009, 11:45 PM
  3. Replies: 6
    Last Post: 09-03-2009, 11:40 AM
  4. Replies: 1
    Last Post: 06-23-2008, 05:27 PM
  5. Replies: 1
    Last Post: 03-08-2008, 06:41 PM

Tags for this Thread

Posting Permissions

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