[squeak-dev] The Inbox: System-ct.1161.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Jun 8 06:40:26 UTC 2020


Hi Christoph,

look at the senders of #resumeUnchecked:. ;-) This message is rather inappropriate to be used in GetTextTranslator. 

If you want to fix image startup, then I suggest to put such exception handlers in NaturalLanguageTranslator class >> #startUp:.

But maybe we can find an even better way to collect errors during image startup and present them only after at least the GUI system was initialized, which happens through Project class >> #startUp: at the moment. Also take a look at ToolSet class >> #debugException:.

Best,
Marcel
Am 06.06.2020 20:55:04 schrieb Jakob Reschke <forums.jakob at resfarm.de>:
Errors are not resumable, although these errors with defaultActions
will resume with something if they do not signal another exception and
*if they are not handled*. If you turned this into a Notification, you
could resume it with another directory listing, but how much sense
would that make?

Am Sa., 6. Juni 2020 um 20:22 Uhr schrieb Thiede, Christoph
:
>
> I wonder anyway why InvalidDirectoryError & Co. override #defaultAction ...
>
> If they are serious errors, they should show up a debugger via UndefinedError but not silently fix that anyhow by returning a default value, shouldn't they?
>
> And if they are no serious errors, they should be Notifications IMO.
>
>
> What do you think? :-)
>
>
> Best,
>
> Christoph
>
> ________________________________
> Von: Squeak-dev im Auftrag von commits at source.squeak.org
> Gesendet: Samstag, 6. Juni 2020 20:19:27
> An: squeak-dev at lists.squeakfoundation.org
> Betreff: [squeak-dev] The Inbox: System-ct.1161.mcz
>
> Christoph Thiede uploaded a new version of System to project The Inbox:
> http://source.squeak.org/inbox/System-ct.1161.mcz
>
> ==================== Summary ====================
>
> Name: System-ct.1161
> Author: ct
> Time: 6 June 2020, 8:19:13.480392 pm
> UUID: 173a90f3-4bb8-fc46-b5a6-6e4ab74e63ca
> Ancestors: System-mt.1160
>
> Catch all InvalidDirectoryErrors in GetTextTranslator availableLanguageLocaleIDs. Those exceptions are an implementation detail and may not confuse the caller. Such a confusion happened in connection with Morphic-ct.1638.
>
> =============== Diff against System-mt.1160 ===============
>
> Item was changed:
> ----- Method: GetTextTranslator class>>availableLanguageLocaleIDs (in category 'accessing') -----
> availableLanguageLocaleIDs
> "GetTextTranslator availableLanguageLocaleIDs"
> | ids dirs localeDirForLang directoryNames |
> ids := Set new.
> dirs := Set new.
> dirs addAll: LocaleDirsForDomain values.
> dirs addAll: self defaultLocaleDirs.
> + [dirs do: [:dir |
> - dirs do: [:dir |
> | localesDir |
> localesDir := FileDirectory on: dir.
> + directoryNames := localesDir directoryNames.
> - directoryNames := [localesDir directoryNames] on: InvalidDirectoryError do: [:e | #()].
> directoryNames
> do: [:langDirName |
> | localeID |
> localeID := LocaleID posixName: langDirName.
> localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID).
> localeDirForLang ifNotNil: [
> (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID]].
> localeID hasParent ifTrue: [
> localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID parent).
> localeDirForLang ifNotNil: [
> (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID parent]]].
> ].
> + ]] on: InvalidDirectoryError do: [:error | error resumeUnchecked: error defaultAction].
> - ].
> ^ids!
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200608/2f093326/attachment.html>


More information about the Squeak-dev mailing list