fornjot
fornjot copied to clipboard
Error handling
for the issue #986 I have re-edited the error the Fornjot application. Do review the PR
Hey @hannobraun well if I use model_path it will return as model/testFile, so this will it work for error message?
if I use
model_pathit will return asmodel/testFile, so this will it work for error message?
Oh, wait, I think I said the wrong thing? The model name should be in the model variable, not model_path.
okay, but can you tell me is anything in rust which can tell me attributes of a particular variable? like in python we have print(dir(object)) or maybe you could recommend me some good VS code extension, at now I only have rust-analyzer its pretty hard for me to know what methods does a particular variable using
okay, but can you tell me is anything in rust which can tell me attributes of a particular variable? like in python we have
print(dir(object))
There's nothing in Rust that would let you print the methods that a type has, as far as I know. This makes sense, as Rust is a statically compiled language (unlike Python), so this kind of data is no longer available at runtime.
You can print actual data though, using dgb!. There are other ways too, for example print!/println!.
or maybe you could recommend me some good VS code extension, at now I only have
rust-analyzer
rust-analyzer is definitely the best Rust extension for VS code, but it's not well-suited to figure out which methods a type has. The best way to figure that out is to look at the documentation.
its pretty hard for me to know what methods does a particular variable using
For types from the standard library, I recommend the official documentation. If you're using a type from a 3rd-part library, you can look up that library on crates.io. Most have a link to documentation on the right. Most documentation is hosted on docs.rs, so you can also search there directly.
If you want to see the source code of a type, you can jump to it using rust-analyzer, using Right Click -> Go to Definition, or by pressing F12 while the cursor is on top of the type name.
@hannobraun is this you want? cargo run isn't panicking anymore
@hannobraun I actually laughed when I read it now breaks in different way will see what I can do. thanks for guiding me so far.