compilers icon indicating copy to clipboard operation
compilers copied to clipboard

Improve error message when can't find `solc`

Open AbhinavMir opened this issue 1 year ago • 0 comments

I ran the example in the README as is, and didn't realize I did not have solc installed. It gave me the following error:

Running `target/debug/compiler-test`
thread 'main' panicked at src/main.rs:9:36:
called `Result::unwrap()` on an `Err` value: Io(SolcIoError { io: Os { code: 2, kind: NotFound, message: "No such file or directory" }, path: "solc" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This seems pretty opaque, I think a simple error message in the vein of "solc not installed" would be more communicative.

I can fix this, but I couldn't figure out where the error is being thrown.

Cheers!

AbhinavMir avatar Feb 15 '24 01:02 AbhinavMir