Skip to content

Commit

Permalink
[whamm] ErrorGen case for errors in Whamm! probes (#188 from matthew-…
Browse files Browse the repository at this point in the history
…mojira/whamm-errorgen)
  • Loading branch information
titzer authored Sep 11, 2024
2 parents d4136b8 + ae31dd1 commit 3e61c67
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/util/ErrorGen.v3
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ class ErrorGen(filename: string) {
def InvalidPreopenPath(path: string) {
setc(WasmError.INVALID_PREOPEN_PATH, Strings.format1("preopen path is invalid: %s", path));
}

// Whamm! probe errors
def WhammProbeError(whammFn: string, msg: string) {
setc(WasmError.WHAMM_PROBE_ERROR, Strings.format2("error inserting Whamm! probe %s: %s", whammFn, msg));
}
}

// Wasm errors are enumerated to allow programmatic matching in unit tests.
Expand Down Expand Up @@ -623,5 +628,7 @@ enum WasmError {
// Engine errors
JIT_ERROR,
// Wasi errors
INVALID_PREOPEN_PATH
INVALID_PREOPEN_PATH,
// Whamm! errors
WHAMM_PROBE_ERROR
}

0 comments on commit 3e61c67

Please sign in to comment.