Solved

Any mechanism to throw an Exception which reach to the container(even if it is not inside a try-catch block)

Posted on 2009-07-13
3
157 Views
Last Modified: 2012-05-07
Is there a mechanism where when a particular exception when thrown,(but this throw is not written inside a try-catch block) propagates to the Container level and not lost ?

We wanted to throw an Exception but not help it propagates by writting the code there) but the exception manages to reach the Container on its own.

Any pointers or suggestions will be highly appreciated.
0
Comment
Question by:manojatinfy
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
Comment Utility
exceptions don't get lost, its either getting to your container and it is ignoring it, or something earlier is catching it and ignoring.
0
 
LVL 4

Expert Comment

by:aman123_123
Comment Utility
You want the exception to reach the container or you want to catch it somewhere?
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
Comment Utility
Try throwing a RuntimeException, stands a better chance of not getting caught before it gets back to your container

you should add exception handling to your container though
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now