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
160 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
ID: 24846828
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
ID: 24846830
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
ID: 24846841
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

856 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