Results 1 to 2 of 2
  1. #1
    ImWithStupid is offline Member
    Join Date
    Nov 2010
    Posts
    10
    Rep Power
    0

    Default Using custom exceptions help

    I am working on an assignment for my class and I seem to have hit a brick wall. For the assignment I was supposed to make a class that holds a String array of error messages (ex "Invalid entry"). So I made it with a total of 5 different error messages. Then I had to make a class called OrderException which I extended off Exception. All that does is run the superclasses constructor and a String which is received in the arguments(passed from the class holding the error message array). Now the problem I'm having is how do I pass the array subscript to the errormessage class and have that sent to the OrderException class. I am thoroughly confused and any help on this matter would be appreciated.

  2. #2
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

    Default

    You mean you want to pass the array variable to the OrderException so data from it can be printed?

Similar Threads

  1. Exceptions
    By Nerijus in forum New To Java
    Replies: 8
    Last Post: 05-18-2010, 01:44 PM
  2. Exceptions & More
    By besweeet in forum New To Java
    Replies: 12
    Last Post: 04-29-2010, 09:06 PM
  3. problem with exceptions
    By dj kourampies in forum New To Java
    Replies: 20
    Last Post: 09-11-2009, 09:59 PM
  4. Exceptions
    By hedonist in forum New To Java
    Replies: 10
    Last Post: 09-08-2009, 08:38 AM
  5. Need Help With Exceptions
    By maggie_2 in forum New To Java
    Replies: 5
    Last Post: 12-15-2008, 07:12 PM

Posting Permissions

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