Announcement

Monday, November 24, 2025

Stop Abusing try/catch. Its Killing Your Productivity

I once joined a consulting project where the team was drowning in bugs. Fixes took 3–5 days, customers were frustrated, and developers felt stuck.

As I reviewed the code, the culprit became obvious: 500+ try/catch blocks scattered everywhere. The mindset was simple -- "It shouldn't crash"

But here’s the irony: crashes are the easiest bugs to fix. They give you a call stack, a direct pointer to the problem. Wrap everything in try/catch, and you don’t prevent crashes—you hide them. The program keeps running in an unstable state, leading to silent data corruption and endless debugging nightmares.

I pushed the team to delete unnecessary try/catch. We went from 500+ blocks to ~50. The impact was immediate: bug turnaround dropped from 3–5 days to just 1 day. Customers were happier, and the team felt empowered again.

Stability doesn't come from hiding crashes. It comes from facing them head-on

Here’s how you can start:

  1. Delete try/catch in private/protected methods. Keep them only in public methods.
  2. Remove catch-all blocks (catch(...), catch(Exception)) everywhere except at the very top of your app.
  3. Replace null checks with proper contracts: @NotNull in Java, assert in C++/others.
  4. When a crash happens (during development or during testing), analyze the call stack and fix it at the highest level possible.

Make these changes and watch your team's debugging speed and delivery timelines skyrocket.

Published on LinkedIN on 24th Nov 2025