Skip to content

Commit

Permalink
Subclass Error for AssertionFailedException
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Nov 18, 2022
1 parent 88cef6e commit feb4f0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
* THE SOFTWARE.
*/
// @ts-check
class AssertionFailedException {
class AssertionFailedException extends Error {
constructor() {
super();
// Use V8's native method if available, otherwise fallback
if ('captureStackTrace' in Error) {
Error.captureStackTrace(this, AssertionFailedException);
Expand Down

1 comment on commit feb4f0c

@rebenchdb
Copy link

@rebenchdb rebenchdb bot commented on feb4f0c Nov 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performance changes for 0b4d374...feb4f0c

Summary Over All Benchmarks
Summary Over All Benchmarks

Full Report

Please sign in to comment.