Custom exception

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Custom exception

  1. #1
    Join Date
    Jul 2003

    Custom exception

    hi, im trying to create a custom exception but couldnt't
    heres what i have:
    try {
    checkSpelling();// This will return an error;
    } catch (CustomException ce)
    System.out.println("Custom exception is: " + ce.getMessage());

    How can I create my own CustomException?
    Any help is appreciated.

  2. #2
    Join Date
    Jul 2005
    SW MO, USA
    Do you get any errors? Please copy and paste the full text here.

    Where is the class CustomException defined? Is its definition available to the compiler and the JVM?
    CustomException should extend Exception.

Similar Threads

  1. Replies: 1
    Last Post: 06-11-2005, 10:45 PM
  2. Custom Errors Page Problem
    By Steve in forum ASP.NET
    Replies: 0
    Last Post: 01-16-2003, 09:42 PM
  3. Custom Errors Page Problem
    By Steve in forum ASP.NET
    Replies: 0
    Last Post: 11-16-2002, 11:14 PM
  4. Exception Handling in Exception Handlers
    By David Williams in forum .NET
    Replies: 1
    Last Post: 05-28-2002, 03:19 PM
  5. Custom Exception classes
    By Patrick Long in forum .NET
    Replies: 1
    Last Post: 06-20-2001, 12:41 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
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center