Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Executor: Replace string errors with full source error #13860

Open
mrcnski opened this issue Apr 9, 2023 · 0 comments
Open

Executor: Replace string errors with full source error #13860

mrcnski opened this issue Apr 9, 2023 · 0 comments
Labels
I7-refactor Code needs refactoring. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Comments

@mrcnski
Copy link

mrcnski commented Apr 9, 2023

ISSUE

Overview

In client/executor/common/src/error.rs we have Error and WasmError which have multiple variants wrapping a String. This makes it hard (impossible?) to reliably match on the underlying cause of the error.

For example, in this PR we want to be able to tell if WasmError::Other is due to a file-not-found error. But currently all we have is a String, and parsing the string is a no-go (the wording may change across locales, etc.).

Related Issue

#13853

@mrcnski mrcnski added I7-refactor Code needs refactoring. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. labels Apr 9, 2023
@mrcnski mrcnski added this to To Do in Substrate Runtime Wasm Execution via automation Apr 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Development

No branches or pull requests

1 participant