Rizal reads Oren’s profile with JSON.parse: catch (e), catch (_e) or a plain catch. See what the linter says, what becomes of e.message in a catch with no…
Plenty of real catch blocks never read their error: a fallback value, feature detection, a JSON.parse allowed to fail. An unread binding makes ESLint warn through no-unused-vars: since v9 catch bindings are checked too (caughtErrors: "all"), and the name _e is not exempt unless your project sets caughtErrorsIgnorePattern. catch { settles it at the syntax level: no name, nothing to complain about. (The lint verdict here is that rule with its default settings, checked for the code in the panel.)
Don’t need the error? Write catch without (e)
catch (e) {} was left empty An empty catch is legal, and no error gets out: the function ends with undefined, the console is clean, the failure is invisible from outside. If e is not read, write catch {, but give it a body: a clear fallback (return null) or a log of the error.catch {}, then surprised e.message cannot be reached With no binding, the catch makes no name at all: e inside it is looked up outside, and since there is none, reading it throws ReferenceError: e is not defined from inside the catch itself. The mistake only shows when the input is broken, since only then does the catch run. Need what the error holds (a log, cause, instanceof)? Write catch (e).catch (_e) {} or // eslint-disable ESLint v9 checks catch bindings (caughtErrors: "all"), and the _ prefix is exempt only if your project sets caughtErrorsIgnorePattern: "^_". // eslint-disable only hides the warning. If the error really is not read, catch { removes the cause: no variable to complain about.catch (e) that reads its error With broken JSON, the console logs the message from e.message, and the neighbourhood head gets null.e unread Mrs. Yanti (ESLint) flags the binding before anything runs: 'e' is defined but never used.catch { The error is still caught, only without a name, and the linter is quiet.catch { that still reads e.message With broken JSON, the catch itself throws ReferenceError: e is not defined.