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
158 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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bitbucket vs gitbucket 3 58
Error with Java/Cache JDBC Classpath 2 31
HSSFWorkbook cannot be resolved error 10 51
Java Loop 6 50
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

863 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

23 Experts available now in Live!

Get 1:1 Help Now