// This rule specifies whether you are
allowed to use
// (java.lang.)Exception and (java.lang.)Throwable
// as the types in catch blocks.
// These type are very generic and might indicate
// an unproper exception handling.
// In general it is better to deal with the specialized
// exception.
public void doSomething()
{
// Generic catch
-- could be any exception
try
{
thisIsDangerous();
}
catch(Exception e)
{
dealWithIt(e);
}
// Specific catch
-- we know what is going on
try
{
thisIsDangerous();
}
catch(FileNotFoundException e)
{
dealWithIt(e);
}
}