Bug 130464 - Want warning for creating exceptions without any message
Summary: Want warning for creating exceptions without any message
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-05 06:47 EST by Johan Walles CLA
Modified: 2006-03-05 06:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Walles CLA 2006-03-05 06:47:27 EST
This is a rather common construct:
throw new WhateverException();

When that exception gets thrown, the only information you have is what kind of exception it is.  In almost all cases, this would have been much better:
throw new WhateverException("The frobs are already glazed");

Then, when the exception gets thrown, you have a high level message explaining why the exception was thrown.

I'd like the JDT to be able to warn about creating new exception objects without providing a non-empty explanation string.