-
July 6th, 2010, 03:11 AM
#1
newbie: exception handling (and Eclipse)
Hello,
I wrote a class with few methods; inside them I work with IO and XMLReader; now, since I haven't managed the exceptions at all, Eclipse was compaining about that and suggested two thing: surround with try/catch blocks or to add throws declaration close to each method, like this:
Code:
String Element() throws IOException, XMLStreamException {
}
After add those two declaration, suddenly Eclipse wasn't complaining no more.
My question is:
1. I read that those declaration don't solve the exception handling BUT only remember to to coder that will use them that he has to manage the exceptions. Right this?
2. so I suppose I have to addtry/catch inside each method: they are five: do I need repeat 5 try/catch in each methods either I can put just one out of them? and Where?
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|