<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Empty catch blocks serve a purpose: They aim to catch the type of exception from the try block, and continue execution from immediately after the try-catch statement. As Brian Goetz often says, let's first look at the problem instead of a solution. What prompted
you to write those empty catch blocks at first?</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> compiler-dev <compiler-dev-retn@openjdk.org> on behalf of David Alayachew <davidalayachew@gmail.com><br>
<b>Sent:</b> Friday, June 20, 2025 6:00 PM<br>
<b>To:</b> compiler-dev <compiler-dev@openjdk.org><br>
<b>Subject:</b> Can we get compiler warnings for empty catch blocks?</font>
<div> </div>
</div>
<div>
<div dir="auto">I got burned pretty bad today because of a large number of empty catch blocks.
<div dir="auto"><br>
</div>
<div dir="auto">If a compiler warning is not feasible or not a good idea, that's fine.</div>
<div dir="auto"><br>
</div>
<div dir="auto">But please let me know -- whether yes, no, or otherwise.</div>
</div>
</div>
</body>
</html>