Community
Participate
Working Groups
Hi I would like a compiler warning or error for empty catch blocks like this: try { ... } catch (Exception e) { }
optionally (minor): unless marked by e.g. @ignore (or other user defined tag)
I would suggest that the catch block is considered empty only if there is white space between the braces.
hmm, this looks pretty empty too: catch(Exception e){} //no white space or catch(Exception e){;} //only empty statements
yup - need to get those too.
Nice to have. Rather some QA tool job.
OK, I just felt that since you have quite a number of options for the compiler, this would be a good addition. Channing
True, but I am tempted to think this one is just deluxe... plus it is not super trivial since it would need to recognize some special comment. We'll keep this suggestion, and will defer it until more people ask for it.
OK sounds good.
Addressed in dup PR.
*** This bug has been marked as a duplicate of 32285 ***