Re: The Inbox: Kernel-dtl.1683.mcz

Christoph Thiede via Squeak-dev <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <0b8ee2d0-cafd-41f3-adaf-9317ca6c2dec@MX2018-DAG1.hpi.uni-potsdam.de>
Hi Dave,

Thanks! I have uploaded an alternative version of a backward compatibility layer for BrokenPromise as a change set to the mailing list which also restores (most of) the functionality of legacy exception handlers without changing the new error semantics of promises:
https://lists.squeakfoundation.org/archives/list/[email protected]/thread/3ZVEDDDOHKXPBNNY3OURK7ZUNWVOVV5T/
Thanks to Marius (mad) and Marcel for discussing this!

That being said, I'm still not in favor of keeping the new error semantics of promises. Signaling a generic error when a promise is rejected with a non-error value and providing no clue to the reason or the promise just feels like making inaccessible a lot of relevant information ...

Best,
Christoph

-- 
Sent from Squeak Inbox Talk

On 2026-04-29T12:35:43+00:00, [email protected] wrote:

> A new version of Kernel was added to project The Inbox:
> http://source.squeak.org/inbox/Kernel-dtl.1683.mcz
> 
> ==================== Summary ====================
> 
> Name: Kernel-dtl.1683
> Author: dtl
> Time: 29 April 2026, 8:35:41.285061 am
> UUID: e0911afb-6bc6-4970-855b-afe5375fde0c
> Ancestors: Kernel-ct.1682
> 
> Restore class BrokenPromise, which was removed between Kernel-eem.1615 and Kernel-tonyg.1616 in the update stream. BrokenPromise is expected to be deprecated but is currently required by external packages.
> 
> =============== Diff against Kernel-ct.1682 ===============
> 
> Item was added:
> + Error subclass: #BrokenPromise
> +     instanceVariableNames: 'promise'
> +     classVariableNames: ''
> +     poolDictionaries: ''
> +     category: 'Kernel-Exceptions'!
> + 
> + !BrokenPromise commentStamp: 'tonyg 2/17/2017 13:53' prior: 0!
> + I am signalled when, during a Promise>>wait, the promise is rejected.
> +     promise:        the promise itself.
> + !
> 
> Item was added:
> + ----- Method: BrokenPromise>>defaultAction (in category 'priv handling') -----
> + defaultAction
> +     self messageText: 'Promise was rejected'.
> +     ^super defaultAction!
> 
> Item was added:
> + ----- Method: BrokenPromise>>error (in category 'accessing') -----
> + error
> + 
> +     ^ promise ifNotNil: [promise error]!
> 
> Item was added:
> + ----- Method: BrokenPromise>>isResumable (in category 'priv handling') -----
> + isResumable
> +     ^ true!
> 
> Item was added:
> + ----- Method: BrokenPromise>>messageText (in category 'accessing') -----
> + messageText
> + 
> +     ^ messageText ifNil:
> +         [self error ifNotNil: [:error |
> +             error asString]]!
> 
> Item was added:
> + ----- Method: BrokenPromise>>promise (in category 'accessing') -----
> + promise
> +     ^ promise!
> 
> Item was added:
> + ----- Method: BrokenPromise>>promise: (in category 'accessing') -----
> + promise: aPromise
> +     promise := aPromise!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.