Results 1 to 3 of 3
  1. #1
    javaplus is offline Member
    Join Date
    Nov 2007
    Posts
    97
    Rep Power
    0

    Default defining own exception

    Hi,

    I want to create my own Exception. For instance if string a has value "default" in it, it is perfectly fine with Java. But in my application it is not allowed. So I want to raise an exception at this point:

    Java Code:
    String str = "default";
    How to define my own exception?

    Cheers-

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

  3. #3
    javaplus is offline Member
    Join Date
    Nov 2007
    Posts
    97
    Rep Power
    0

    Default

    Thanks. I will go through it and will post queries if I have any.

Similar Threads

  1. JDO - defining the persistence using metadata
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-17-2008, 07:50 AM
  2. Defining a Native Method
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-23-2007, 07:44 AM
  3. Defining own Exception
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-12-2007, 10:09 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
  •