Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

How can i automatically find all unhandled exceptions in my java code?

Thread view: 
upsa - 14 Mar 2007 01:29 GMT
see subj,
Thanks.
Eric Sosman - 14 Mar 2007 01:40 GMT
> see subj,
> Thanks.

See sig.
Signature

Eric Sosman
esosman@acm-dot-org.invalid
Read the error messages from javac.

Stefan Ram - 14 Mar 2007 01:48 GMT
>>see subj,
>See sig.

 See »X-Readme« header.
upsa - 14 Mar 2007 03:21 GMT
> >>see subj,
> >See sig.
>
>   See >X-Readme< header.

What did you mean ?
Hendrik Maryns - 14 Mar 2007 15:05 GMT
upsa schreef:
>>>> see subj,
>>> See sig.
>>   See >X-Readme< header.
>
> What did you mean ?

He meant that you should see the X-Readme header.  Do a search for
‘email headers’.

H.
Signature

Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

Ingo R. Homann - 14 Mar 2007 15:48 GMT
Hi,

>>>>>see subj,
>>>>See sig.
>>>  See >X-Readme< header.
>>What did you mean ?
> He meant that you should see the X-Readme header.  Do a search for
> ‘email headers’.

OMG (=Oh my god)!

What kind of nerd humor is it to express onself intentionally baffling
and not even respond in an understandable way if the OP exlicitely asks
for it? (IMHO it is the same kind of behaviour that we nerds make fun of
if e.g. a manager or salesman does so).

To upsa:
Eric meant: "Read the error messages from javac."
Stefan meant: "But wouldn't this apply only to the checked exceptions,
not to runtime exceptions."

Ciao,
Ingo
Alex Hunsley - 14 Mar 2007 16:09 GMT
> Hi,
>
[quoted text clipped - 11 lines]
> for it? (IMHO it is the same kind of behaviour that we nerds make fun of
> if e.g. a manager or salesman does so).

They are chastising/needling the OP in a round-about way for not putting
the question where it is most important to have it: the message body.

> To upsa:
> Eric meant: "Read the error messages from javac."
[quoted text clipped - 3 lines]
> Ciao,
> Ingo
Ingo R. Homann - 14 Mar 2007 16:48 GMT
Hi,

> They are chastising/needling the OP in a round-about way for not putting
> the question where it is most important to have it: the message body.

I think the question (short and exact) is put perfectly where it should
be - in the subject. Of course, one could argue about if it would be a
good idea to copy&paste to the body. (Although I do not think that it is
worth arguing about that.)

Having said this: If they have the oppinion that the OP should put the
question in the message body, they should say that - especially when he
asks for explaining what they meant. I don't think that the OP can read
their minds. He will only think "What ... nerds!"

Ciao,
Ingo
Alex Hunsley - 14 Mar 2007 17:45 GMT
> Hi,
>
[quoted text clipped - 4 lines]
> I think the question (short and exact) is put perfectly where it should
> be - in the subject.

It's just netiquette, I believe, that you should always have a
containing actual content rather than an empty one or one that says "see
subject".

> Of course, one could argue about if it would be a
> good idea to copy&paste to the body. (Although I do not think that it is
> worth arguing about that.)

A succinct and direct question is good as a subject line. Personally I
think it should be pasted as the body too, even if it is only the same
content as the subject line.

> Having said this: If they have the oppinion that the OP should put the
> question in the message body, they should say that - especially when he
> asks for explaining what they meant. I don't think that the OP can read
> their minds. He will only think "What ... nerds!"

It would be more helpful to have done that, yes.
Lew - 15 Mar 2007 02:57 GMT
>>> They are chastising/needling the OP in a round-about way for not
>>> putting the question where it is most important to have it: the
>>> message body.

Ingo R. Homann wrote:
>> Having said this: If they have the oppinion that the OP should put the
>> question in the message body, they should say that - especially when
>> he asks for explaining what they meant. I don't think that the OP can
>> read their minds. He will only think "What ... nerds!"

> It would be more helpful to have done that, yes.

But far less clever.

And needling does not violate netiquette.

And when the OP rises to the level where they appreciate the needling, then
they will have transformed more than if they were given the easy way.

-- Lew
Oliver Wong - 19 Mar 2007 22:30 GMT
>>>see subj,
>>See sig.
>
>  See »X-Readme« header.

(I wonder if this reply post will replicate your X-Readme header or not --  
I suspect not)

   Right, as Stefan says, Eric's solution of reading the javac error
messages would only apply to checked exceptions. To handled unchecked
exceptions, you might be able to do a bit of static analysis on the source
code, but I suspect that in general the problem is insoluble. For example,
what if you write a ClassLoader which generates random (but legal)
bytecode? It may generate code which throws a runtime exception without
declaring so in the method header, and you'd have a tough time "finding"
this unhandled exception (how would you define "find" in this case?) via
static analysis.

   - Oliver
Ingo R. Homann - 14 Mar 2007 09:54 GMT
Hi,

>> see subj,
>> Thanks.
> See sig.

The problem is that you do not get uncaught RuntimeExceptions as Stefan
more or less mentioned. So, IMHO the correct answer would be:

"Read the error messages from javac and catch RuntimeExceptions in your
main-method."

Ciao,
Ingo
sss.zhou@gmail.com - 15 Mar 2007 02:17 GMT
> > see subj,
> > Thanks.
[quoted text clipped - 4 lines]
> esos...@acm-dot-org.invalid
> Read the error messages from javac.

I wasn't able to understand automatically.

Next time I suggest you shall write some content in main message even
if it is same as the title.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.