From 84ec839b041a0da2a7a950c47f003d5bebfe4685 Mon Sep 17 00:00:00 2001 From: Manti <67705577+mantikafasi@users.noreply.github.com> Date: Wed, 16 Nov 2022 02:40:46 +0300 Subject: Add ReviewDB Plugin (#187) Co-authored-by: Ven --- src/debug/Tracer.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/debug') diff --git a/src/debug/Tracer.ts b/src/debug/Tracer.ts index 1e81691..4e17143 100644 --- a/src/debug/Tracer.ts +++ b/src/debug/Tracer.ts @@ -55,9 +55,10 @@ export const traceFunction = !IS_DEV const traceName = mapper?.(...args) ?? name; beginTrace(traceName, ...arguments); - const result = f.apply(this, args); - finishTrace(traceName); - - return result; + try { + return f.apply(this, args); + } finally { + finishTrace(traceName); + } } as F; }; -- cgit