Skip to content

How to detect panic on a future in LocalSet::spawn_local #4408

Answered by Darksonn
Kxuan asked this question in Q&A
Discussion options

You must be logged in to vote

You will need to .await (or block_on) the JoinHandle that it returns and check its return value for errors.

Unfortunately, there's no way to change how the runtime handles panics.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Kxuan
Comment options

@Darksonn
Comment options

@Kxuan
Comment options

@Darksonn
Comment options

Answer selected by Kxuan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants