Linked Questions

3 votes
5 answers
2k views

My question actually comes in two parts hence the ambiguous title. Part One As far as I'm aware, you should never swallow an exception. Not even logging it and forgetting about. In general cases, I ...
Andrew Weir's user avatar
  • 1,040
2 votes
6 answers
4k views

Take this piece of code: try { FileReader f=new FileReader("D:/sda.t"); }catch(FileNotFoundException e) { e.printStackTrace(); ...
Abhilash28's user avatar
0 votes
7 answers
1k views

I'm sure I'm going to catch flack for this... but I'm coming from a language with no try/catch blocks and I'm learning about Java exception catching, and I'm having a hard time seeing how it's not ...
Mike's user avatar
  • 49.8k
6 votes
2 answers
1k views

I have read and discussed the following questions and articles deeply and many others now and in the past: When to use try/catch blocks? Main method code entirely inside try/catch: Is it bad ...
Saw's user avatar
  • 6,454
1 vote
4 answers
1k views

I write a three tiers web application. DAL BLL and web Presentation Layer,every tier has methods , so the question is where should I catch exception( using try catch),in web?BLL?or DAL? and why? thank ...
SleeplessKnight's user avatar
2 votes
6 answers
228 views

I have some methods that return a value (or object) if all went as planned, otherwise return null (something went wrong). For example, DataTable dt = DoSomething(); If something blew up in ...
DenaliHardtail's user avatar
6 votes
2 answers
758 views

What are some good ways to handle known errors that occur in a method? Let's take a user registration method as an example. When a user is signing up, a method SignUp( User user ) is called. There ...
Josh Close's user avatar
  • 23.5k
1 vote
4 answers
344 views

When would you want to propagate an exception to another Class/Method versus catching the Exception in the same Class/Method?
Cactus BAMF's user avatar
3 votes
3 answers
196 views

Is it a good practice to catch all exceptions and re-throw them as a specific type -basically to classify all the exceptions thrown from a particular part (or service) of an application? Something ...
pencilCake's user avatar
  • 53.8k
6 votes
0 answers
157 views

Possible Duplicate: In Java, when should I create a checked exception, and when should it be a runtime exception? I heard a lot of things about Exception over RuntimeException but no clear ...
Jerome Cance's user avatar
  • 8,203
2 votes
4 answers
109 views

When I throw an exception from the package in which I handle the database, in the package in which I handle the UI, should I throw the same exception or create another? The UI package should know ...
MartinGian's user avatar

15 30 50 per page
1
2