Skip to content

Handle panics by spawned components in Application::run #10

Closed
@tillrohrmann

Description

@tillrohrmann

The Application struct spawns different components. If a spawned component panics, this is currently not handled properly. If this happens, then we need to either propagate the panic or fail the process. There are different ways to achieve it:

  1. compile the binary with panic = abort to abort on panics
  2. Poll the returned JoinHandle to handle panics in spawned components
  3. Use catch_unwind to catch panics and handle them (e.g. aborting the process or returning them as errors)

The latter approach is more selective but also prone to errors.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions