From 29cf26e1daed68abb60a3866c0461dcdb19d8a59 Mon Sep 17 00:00:00 2001 From: Jens Melgaard Date: Wed, 11 Sep 2019 10:23:09 +0200 Subject: [PATCH] Adding finally example Considering that there is a try/catch-throw/finally example under the dont do, shouldn't there be an example of how to do that finally correctly? --- docs/rules/no-useless-catch.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/rules/no-useless-catch.md b/docs/rules/no-useless-catch.md index d320e561d07f..0562063f634d 100644 --- a/docs/rules/no-useless-catch.md +++ b/docs/rules/no-useless-catch.md @@ -43,6 +43,12 @@ try { } catch (e) { handleError(e); } + +try { + doSomethingThatMightThrow(); +} finally { + cleanUp(); +} ``` ## When Not To Use It