Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Beginning Java
create an Exception
Andrew Lit
Ranch Hand
Posts: 135
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
i was wondering how to create an exception that would react on some events of my own. well for example when some expression is false then exception is thrown.
thank you.
Anonymous
Ranch Hand
Posts: 18944
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
you can simple create a new Exception
public class WhatEverException extends Exception{}
and then in your code simply
throw new WhatEverException();
[ July 31, 2003: Message edited by: Oliver Refle ]
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
please tell me.......................
Why do we need different exception classes in Java?
Checked Exception.
init () method throws exception
using join query in hibernate
More...