Skip to content

Commit 71e77dc

Browse files
evm: fix err handling
1 parent d00b7bf commit 71e77dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/evm/src/interpreter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ export class Interpreter {
338338
if (overheadTimer !== undefined) {
339339
this.performanceLogger.unpauseTimer(overheadTimer)
340340
}
341-
// re-throw on non-VM errors
342-
if (!('errorType' in e && e.errorType === 'EvmError')) {
341+
// re-throw on non-VM-runtime errors
342+
if (getRuntimeError(e) === undefined) {
343343
throw e
344344
}
345345
// STOP is not an exception

packages/util/src/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type EthereumJSErrorObject = {
1818
*/
1919
export class EthereumJSError<T extends { code: string }> extends Error {
2020
type: T
21-
code: string
21+
code: string // TODO likely remove this and for error inspection inspect `error.type.code` (like Lodestar)
2222
constructor(type: T, message?: string, stack?: string) {
2323
super(message ?? type.code)
2424
this.type = type

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy