From: Jérôme Benoit Date: Sun, 6 Aug 2023 13:05:27 +0000 (+0200) Subject: refactor: cleanup try catch constructs X-Git-Tag: v1.2.20~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9c0ecbdfc6c453983f93a58e80ddb4d1294b4483;p=e-mobility-charging-stations-simulator.git refactor: cleanup try catch constructs Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ui-server/ui-services/AbstractUIService.ts b/src/charging-station/ui-server/ui-services/AbstractUIService.ts index 8e359b4d..6fd59b86 100644 --- a/src/charging-station/ui-server/ui-services/AbstractUIService.ts +++ b/src/charging-station/ui-server/ui-services/AbstractUIService.ts @@ -193,7 +193,7 @@ export abstract class AbstractUIService { try { await Bootstrap.getInstance().start(); return { status: ResponseStatus.SUCCESS }; - } catch (error) { + } catch { return { status: ResponseStatus.FAILURE }; } } @@ -202,7 +202,7 @@ export abstract class AbstractUIService { try { await Bootstrap.getInstance().stop(); return { status: ResponseStatus.SUCCESS }; - } catch (error) { + } catch { return { status: ResponseStatus.FAILURE }; } }