[Feature Request] Improved error message on file not found, and support to give class name instead of file
smarr opened this issue · 1 comments
[Very Very Low Priority, but I thought I mention it]
At the moment, when a command line such as the following is given: -cp Smalltalk Harness List
, yksom will bark with the following error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:59:64
It would be great if the error could be a little more user friendly, and at least name which file wasn't found. Ideally, it would also avoid the Rust-specific output.
In the specific example, the problem is that Harness
is actually Harness.som
on the disk, and thus, not found.
The second feature request would be to support giving the class name for an entry point/main script, in addition to supporting the use of file names.
All other SOM implementations will try to load Harness
from the classpath.
I didn't look up the exact logic implemented, but this works across SOMs:
SOMpp$ ./SOM++ -cp Smalltalk Examples/Hello.som
This is SOM++
Hello, World from SOM
SOMpp$ ./SOM++ -cp Smalltalk:Examples Hello
This is SOM++
Hello, World from SOM