Stops using "ex." to abbreviate "for example" (#827)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2022-10-24 10:51:48 +08:00
committed by GitHub
parent 1a9b174631
commit 1cbb496c26
43 changed files with 145 additions and 143 deletions

View File

@@ -135,9 +135,9 @@ func (s *stackTrace) FromRecovered(recovered interface{}) error {
}
// At this point we expect the error was from a function defined by HostModuleBuilder that intentionally called panic.
if runtimeErr, ok := recovered.(error); ok { // Ex. panic(errors.New("whoops"))
if runtimeErr, ok := recovered.(error); ok { // e.g. panic(errors.New("whoops"))
return fmt.Errorf("%w (recovered by wazero)\nwasm stack trace:\n\t%s", runtimeErr, stack)
} else { // Ex. panic("whoops")
} else { // e.g. panic("whoops")
return fmt.Errorf("%v (recovered by wazero)\nwasm stack trace:\n\t%s", recovered, stack)
}
}