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
Proposal to move grammar related part of error messages behind a runtime flag #5585
Comments
From @MasterDuke17Paraphrasing from IRC where my first comment starts here: http://irclog.perlgeek.de/perl6/2016-08-17#i_13035789 My feeling has always been that Perl 6's errors are good, but I'm sympathetic to whoever it was that complained that the list of "expecting any of" things wasn't all that helpful in the general case. Personally, I have never once gotten any useful information out of them, but the messages that precede them are very helpful. E.g., perl6 -ne '.say if /asdf \s+ \/' gives the error message: ===SORRY!=== The first two parts are really helpful, but the "expecting any of" I ignore. I understand that people doing fancy grammar related things probably do find them very useful. However, my impression is that most people "in the wild" writing Perl (5 or 6) are frequently doing command line text manipulation and things like that (akin to my example). And for them, the first part of the error message is extremely useful and the second part isn't (IMHO). So I propose turning the second part (i.e, "expecting any of" and things like that) off in the general case and adding a flag to turn it on (--grammar-errors?), like we already have for --ll-exceptions. |
From @MasterDuke17Another suggestion would be to leave them as is unless you're running with On Tue, Aug 16, 2016 at 9:25 PM, perl6 via RT <perl6-bugs-followup@perl.org>
|
From @AlexDanielOn 2016-08-18 07:51:47, ddgreen@gmail.com wrote:
Can you elaborate a little bit? For example, why would I care less about this section in error messages when I'm using -e ? Or why would I suddenly need it when I'm executing a file? |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetOn Tue, 16 Aug 2016 18:25:28 -0700, ddgreen@gmail.com wrote:
Thanks, but the PR was rejected. I don't think the added maintenance burden and extra option the users have to read through justify the presence of this very minor feature that might not be desired by all. We have since implemented `RAKUDO_EXCEPTIONS_HANDLER` env var[^1] that lets users use custom classes for error reporting (that allow filtering for custom handling for just specific exceptions; letting default handler handle the rest). So there's a possibility of implementing this feature entirely in a module; or expanding the idea further: `Exceptions::Simple` for example that give just the basics. [1] https://docs.perl6.org/programs/00-running#Error_Message_Verbosity_and_Strictness |
@zoffixznet - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#128969 (status was 'rejected')
Searchable as RT128969$
The text was updated successfully, but these errors were encountered: