Skip to content
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

Forked futures do not capture errors #3948

Closed
chisandrei opened this issue Aug 7, 2024 · 1 comment
Closed

Forked futures do not capture errors #3948

chisandrei opened this issue Aug 7, 2024 · 1 comment

Comments

@chisandrei
Copy link
Member

When using a forked future that triggers an error, the future does not capture the error and we get a debugger.

Screenshot 2024-08-07 at 19 24 29
label := (BrLabel new)
	aptitude: BrGlamorousLabelAptitude;
	withAsyncFutureDo: [:anElementFuture |
		anElementFuture
			whenSuccess: [:aLabel :aStatus | 
				aLabel text: aStatus asString];
			whenError: [:aLabel :anError | 
				aLabel text: 'Error: ' , anError description];
			whenPending: [:aLabel |
				aLabel text: (aLabel text asString asRopedText 
					foreground: Color gray)]];
	yourself
label asyncFuture
	future: [  1/0 ] asAsyncForkedFuture
syrel added a commit to feenkcom/pharo-futures that referenced this issue Aug 14, 2024
@syrel
Copy link
Member

syrel commented Aug 14, 2024

Works now:
Screenshot 2024-08-14 at 11 44 09
Screenshot 2024-08-14 at 11 45 07

@syrel syrel closed this as completed Aug 14, 2024
syrel pushed a commit that referenced this issue Aug 14, 2024
Metacello new
    baseline: 'GToolkitForPharo9';
    repository: 'github://feenkcom/gtoolkit:v1.0.1059/src';
    load

All commits (including upstream repositories) since last build:
feenkcom/pharo-futures@8bad74 by Aliaksei Syrel
[#3948] add event handling to the forked future

feenkcom/Brick@e41d96 by Andrei Chi�
Merge 1e901c5ed6b6f77118c41b1abb5f7a105875cab2

feenkcom/Brick@475e33 by Andrei Chi�
Add an utility method for stopping the time update task [#3942]

feenkcom/gtoolkit-phlow@a3c282 by Andrei Chi�
Add utility elements for creating phlow tools

feenkcom/gtoolkit-coder@9f5112 by Andrei Chi�
Update icon for the search tool

feenkcom/gt4pharo@abe320 by John Brant
adding leSubstringMatch and leASTMatches lepiter filters

feenkcom/lepiter@19c1a3 by John Brant
adding leSubstringMatch and leASTMatches lepiter filters

feenkcom/gt4gemstone@3a09b4 by Andrei Chi�
Add a button in the tool for controling the automatic replacement of content [#3942]

feenkcom/gt4gemstone@d97179 by Andrei Chi�
Control if async executions automatically replace the pane content [#3942]

feenkcom/gt4gemstone@6daedd by Andrei Chi�
Merge cd35932611502b8b8a6b4d7268710f2549830e2e

feenkcom/gt4gemstone@48571c by Andrei Chi�
Pass on the UI for non-blocking gemstone calls [#3942]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants