-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wishes for FileIOException #3075
Comments
Added this to the Later milestone. |
By default, we want the exceptions to provide as much info as possible for quick debugging. That said, it should be quite easy to customize the output of exceptions, as both FileException.message and OSError.message are available. In the example above it be changed to: print('Error reading ${relativize(cwd, uri)}: ${ex.osError.message}.'); If you are unable to extract the info needed, please open the issue again. Added AsDesigned label. |
I don't think the class OSError existed when I wrote this request. OSError definitely satisfies my second wish (and enables me to produce a better error message). Thank you for that. I still wish that FileException would contain the name of the file. Added Triaged label. |
I've landed FileException.path in r24523. Added Fixed label. |
Wow, I got two wishes granted! Thank you. |
Removed Area-IO label. |
New commits in this version: git -C third_party/pkg/pub log --oneline cd7a43f2109f7e5eb22e73c7f4e15d25fd57598e..d95c5713dda518ed53ada70e00789e6aadbfbe48 d95c5713 (HEAD, origin/master, origin/HEAD) Remove duplicate global invocation on Windows (#3055) 4c5198df master->main (#3101) e793fd52 More tool/test.dart tweaks (#3097) 1b228edd Report retracted packages (#3093) 4fedb6c5 Tweak strict dependencies error message for `_validateBenchmarkTestTool` (#3087) e608ab6e Improve test script (#3091) abf702c4 Detect potential leaks in `dart pub publish`. (#3049) 9941c1f9 Fix broken simplification of prerelease constraints (#3078) f0cdfa27 format (#3086) 5a1242c6 Fix unicode terminal detection windows (#2933) 58e2296d Dart format (#3084) 1426601c use incremental compilation in the tool/test.dart script (#3075) 9954f851 Fix a typo (#3062) 44489b31 Use relative import for path.dart (#2959) 77702ab1 Always precompile scripts before running them (#3074) Change-Id: I913ab9e3b5bc7181d483a2de96ec4ad917028b75 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213262 Reviewed-by: Jonas Jensen <[email protected]> Commit-Queue: Sigurd Meldgaard <[email protected]>
…4 revisions) https://dart.googlesource.com/dartdoc/+log/adc5a45ddafb..621c9192cc24 2022-07-12 [email protected] Move annotation tests out of end-to-end test (#3078) 2022-07-11 [email protected] Move test skip above test body (#3076) 2022-07-11 [email protected] Remove ElementType.returnedFrom; was completely unused (#3077) 2022-07-09 [email protected] Make Mixin.superclassConstraints late final non-nullable (#3075) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-doc-dart-sdk Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Tbr: [email protected] Change-Id: I82e92bf6c915969b2ba72de470939673f63b4de9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251161 Commit-Queue: Nate Bosch <[email protected]> Reviewed-by: Nate Bosch <[email protected]>
I'm currently looking at what dart2js reports when it cannot read a file and noticed a few things about FileIOException that I wish were different.
Currently, this is how I deal with FileIOException:
...
} catch (FileIOException ex) {
print('Error reading ${relativize(cwd, uri)}: ${ex.osError}.');
exit(1);
}
This prints:
Error reading fiskefisk: OS Error: No such file or directory, errno = 2.
This message contains a lot of information that is nice for a developer, but to my user, I would like to simply print:
Error reading fiskefisk: No such file or directory.
The text was updated successfully, but these errors were encountered: