[squeak-dev] Should InvalidDirectoryError be a Notification?
Christoph.Thiede at student.hpi.uni-potsdam.de
Fri May 20 16:21:26 UTC 2022
> > Should we rethink the definition of this exception class?
> If it's now possible to give a test designer the choice of whether to handle the exception or not, that sounds like a win...
There is not actually a choice: Unless in application code, if an InvalidDirectoryError is not handled in test code, the test will be marked as an error. This is why I find this so confusing. But okay, for sake of backward compatibility, I will try to fix these silent errors anyway. Thanks. :-)
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Tim Johnson <digit at sonic.net>
Gesendet: Freitag, 20. Mai 2022 17:59:41
An: Squeak Developers
Betreff: Re: [squeak-dev] Should InvalidDirectoryError be a Notification?
On May 20, 2022, at 5:00 AM, christoph.thiede at student.hpi.uni-potsdam.de<mailto:christoph.thiede at student.hpi.uni-potsdam.de> wrote:
With InvalidDirectoryError, we have one more exception class that overrides #defaultAction to handle itself silently without bringing up a debugger. As a consequence, some tests that reproduce normal user interactions will fail for no visible reason. See DirectoryChooserDialogTest>>testChooseAbsentDirectory in polish-file-dialogs.3.cs<https://lists.squeakfoundation.org/pipermail/squeak-dev/2022-May/220634.html> for an example.
I am unsure how to deal with these situations: Isn't an error that doesn't bring up a debugger some kind of anti-pattern?
I usually think of these as decisions that were made to support end-user experience in Squeak. In this case, perhaps it supports hard-coded paths that live within older release images and/or VM builds on various platforms. Or maybe it made loading image segments smoother...
Should we rethink the definition of this exception class?
If it's now possible to give a test designer the choice of whether to handle the exception or not, that sounds like a win...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev