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
CATCH block and tied errors #14111
Comments
From @b2gillsThere have been discussions about how to get to the My proposal is for the internal errors/warnings to produce use warnings qw' FATAL all '; # use foreach on Perls which lexicalize $_ when( ::warnings::uninitialized ){ Now comes the heart of my idea, a construct which does CATCH{ Which is basically the same as if( defined $@ ){ ... default{ die $@ } # die should throw tied objects unchanged Of course if you provide a `default` block it replaces the normal one. CATCH{ default{ } # ignore otherwise uncaught errors If user code generates an error it can be handled by the same construct: eval{ The reason I don't have blocks which contain a `CATCH` block There could also be a `try` block which surrounds the rest try{ becomes: do{ eval{ I'm not certain how it should deal with code in the same outer block At some later point the internals could be changed to exit 0 unless defined $@; That way the error that gets printed to STDERR can change over time With this design user code can get the same benefits without having |
Migrated from rt.perl.org#122833 (status was 'new')
Searchable as RT122833$
The text was updated successfully, but these errors were encountered: