aboutsummaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
authorManti <67705577+mantikafasi@users.noreply.github.com>2022-11-16 02:40:46 +0300
committerGitHub <noreply@github.com>2022-11-16 00:40:46 +0100
commit84ec839b041a0da2a7a950c47f003d5bebfe4685 (patch)
tree54ec06d2ecc13ccbc3908194f60b277d24f9d70f /src/debug
parentb30508aef8cd19625640ee650b58b557bb3fdd24 (diff)
downloadVencord-84ec839b041a0da2a7a950c47f003d5bebfe4685.tar.gz
Vencord-84ec839b041a0da2a7a950c47f003d5bebfe4685.tar.bz2
Vencord-84ec839b041a0da2a7a950c47f003d5bebfe4685.zip
Add ReviewDB Plugin (#187)
Co-authored-by: Ven <vendicated@riseup.net>
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/Tracer.ts9
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;
};