You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I'm working along with #242, I was reminded that there's still a fair bit of technical debt in the code base in the form of Perl 6-level exceptions that ought to be 007-level exceptions.
Specifically, we rely quite a bit on Perl 6's own language-level exceptions (those thrown by the Perl 6 compiler), and that ties us unnecessarily to Perl 6.
For each exception throwing site that we "lift" into 007, it would be nice to have a corresponding test. We ought to be able to have all those tests without implementing a catch mechanism in 007, since all we care about is the exception bubbling up to the top level and aborting the program. As usual, we want to test not just the type of the exception, but all its pertinent data, too.
The text was updated successfully, but these errors were encountered:
After we do this one, we might also consider reducing the exception types to the bare minimum. Python is quite exemplary here: many exceptions come down to ValueError, LookupError, or TypeError.
Java is also praiseworthy: even though it has many, many exception types in its standard library, many exceptions can be reduced to either IllegalArgumentException or IllegalStateException.
There needs to be a distinction between exception types when we expect to ever use that distinction by type-matching into differen categories. If we don't expect to do that, we might as well simplify the exception hierarchy in places where we can.
As I'm working along with #242, I was reminded that there's still a fair bit of technical debt in the code base in the form of Perl 6-level exceptions that ought to be 007-level exceptions.
Specifically, we rely quite a bit on Perl 6's own language-level exceptions (those thrown by the Perl 6 compiler), and that ties us unnecessarily to Perl 6.
For each exception throwing site that we "lift" into 007, it would be nice to have a corresponding test. We ought to be able to have all those tests without implementing a
catch
mechanism in 007, since all we care about is the exception bubbling up to the top level and aborting the program. As usual, we want to test not just the type of the exception, but all its pertinent data, too.The text was updated successfully, but these errors were encountered: