diff options
Diffstat (limited to 'src/debug/Tracer.ts')
-rw-r--r-- | src/debug/Tracer.ts | 9 |
1 files changed, 5 insertions, 4 deletions
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; }; |