|
|
|
|
|
by nivenkos
1949 days ago
|
|
You can attach context to the errors though. It's only really a pain when writing libraries as you have to be so specific about your error types, etc. Overall, it's probably still the "least bad" option compared to other languages' approaches (both Go and Python are painful for this for example). But it can be a lot of extra work sometimes, especially when just working on the first basics of a library crate. |
|
I'd say you should attach context.
If there's problems accessing a file, then having an error message without the filename in it is near useless.