An app that watches things in the background has a different relationship with errors than a form does. Nobody is looking at the screen when something throws, so the choice is between crashing quietly, which stops the watching, and carrying on quietly, which hides the problem. Notifio, the desktop app from notifio.app, mostly chooses the second. I wanted to know how often, and whether each choice is written down.

I have already written about four ways a desktop notification can be unavailable and outside services that can be down, the latter about a sister app. This is the whole app counted in one pass.

The count

A script over all 47 TypeScript and TSX files in the app, matching three shapes:

Shape Sites
catch { } with nothing in it, or only a comment 29
.catch(() => {}) or .catch(() => null) 17
.catch(() => '') or another constant fallback 12

Fifty-eight in total, in 16 files. The word catch appears 144 times in the app, so about two in five error paths end in nothing. Thirty-five of the 58 are in three files that drive the embedded browser, and I am leaving those alone here. The remaining 23 are ordinary application plumbing: the log, the on-disk ledger, the licence cache, the local web server and the UI.

One rule makes a swallow safe

Looking at the 23, a pattern shows. A swallowed error is fine when two things are true: the operation is best effort, and its failure cannot change what happens next. Three examples that pass:

_listeners.forEach((fn) => { try { fn(fresh); } catch { /* a broken listener must not lose the find */ } }); 

The find has already been written to disk. A listener that throws must not stop the other listeners, and must not undo the write. Swallowing is the whole point.

} catch { // A torn final line (power loss mid-append) must not poison the read. } 

The ledger is a text file with one JSON record per line. If power fails mid-append, the last line is half a record. Skipping it loses one entry and keeps the other thousand.

try { res.write(frame); } catch { // Client vanished mid-write; the close handler will drop it. } 

A browser tab disconnected. Another handler already owns the cleanup.

All three comments name the reason, and one of them names who else is responsible.

A swallow that must not mean "yes"

The most interesting one is where swallowing is dangerous, and the code knows it.

let loggedIn = false; try { loggedIn = await checkLoginStatus(siteUrl); } catch { // A check that failed is not permission to carry on. } if (loggedIn) return null; 

The variable starts as false, so the catch does nothing and the failure falls through to the safe answer. The comment exists because a tidy-minded reader would otherwise want to log it, or return early, or flip the default. The default is the logic.

The nine that do not say why

Of the 29 empty blocks, 20 give a reason. Nine do not: four are the bare word ignore and five have no comment at all. Of those, the ones outside the browser layer are:

  • the licence cache clear, // ignore, deleting a file that may not exist;
  • one ledger reset helper, // ignore;
  • the append to the app's own log file, /* ignore */;
  • a local server route that checks whether you are signed in after adding a site, // ignore;
  • a new URL() in the sign in dialog, with nothing in the braces.

All five are probably fine. Deleting a missing file, appending to a log that failed to open, and parsing a malformed URL for display are the classic safe cases. But "probably fine" is what the comment is for, and the sign in dialog one is the only one a reader cannot judge, because there is no line to read. In the dialog, a bad URL leaves the hostname as an empty string, which then gets used in the label. That is a quiet cosmetic bug waiting for the day a URL is wrong.

The log append is the one I would argue about. If the log file cannot be written, the app that told you to check the log file in a crash dialog has nowhere to write the reason. That is covered in the crash screen post.

What I changed my mind about

I started this wanting to say that empty catches are a smell. After reading the 23, I think the smell is the missing sentence, not the empty block. Twenty of 29 explain themselves and every one of those is something I would defend in review. The nine that do not are the ones I could not.

The practical rule I am taking from it: an empty catch needs one sentence that says what failure it is, and which later line is responsible for the consequence. If I cannot write that sentence, it is not an empty catch, it is a bug.

If you want to see what the app does when it is working, the download page has the installers and the help page covers what the activity log is telling you.