Will It Vibe logoWill It Vibe?
JAVA-004Low severity-4 points

Empty catch block swallows an exception

Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.

What it detects

A catch block has no statements (and no comment explaining why), so the exception is silently discarded. The failure this exception represents disappears with no log entry, no metric, and no fallback.

Why it matters

An empty catch block discards the exception with no log entry, no metric, and no fallback path. The failure it represents does not go away: it just becomes invisible, so the first sign of trouble is often a downstream symptom that takes far longer to trace back to its real cause.

How to fix it

At minimum, log the exception with enough context to diagnose it (the operation being attempted, relevant identifiers, and the exception itself). If the failure genuinely can be ignored, say so explicitly with a comment explaining why, so the next reader does not have to guess whether it was a mistake.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Code Quality & Syntax checks