From a790dfc7839dee837f2922bd615934a096b09ff8 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 20 Jan 2023 12:44:58 +0100 Subject: [PATCH] remove uneeded try/catch --- .../debugger-ui/src/lib/debugger-ui.tsx | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx index 8b046657c1..34a8affad8 100644 --- a/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx @@ -319,21 +319,17 @@ export const DebuggerUI = (props: DebuggerUIProps) => { }) }) } catch (error) { - try { - unLoad() - setState(prevState => { - let errorMsg = error.message || error - if (typeof errorMsg !== 'string') { - errorMsg = JSON.stringify(errorMsg) + '. Possible error: the current endpoint does not support retrieving the trace of a transaction.' - } - return { - ...prevState, - validationError: errorMsg - } - }) - } catch (e) { - console.error(e) - } + unLoad() + setState(prevState => { + let errorMsg = error.message || error + if (typeof errorMsg !== 'string') { + errorMsg = JSON.stringify(errorMsg) + '. Possible error: the current endpoint does not support retrieving the trace of a transaction.' + } + return { + ...prevState, + validationError: errorMsg + } + }) } }, 300) handleResize()