Skip to content

Throw ExitException in Serverpod.start instead of exiting process #2725

Closed

Description

@hampuslavin

Is your feature request related to a problem? Please describe.
To enable the new Serverpod test helpers to run Serverpod in test mode, it needs to gracefully be able to handle start-up failures without exiting the process (which would exit the test runner altogether).

An ExitException should be thrown instead so that the caller can decide what to do with the failure.

Activity

  1. added
    enhancement
    on Sep 9, 2024
  2. SandPod commented on Sep 9, 2024

    @SandPod
    Contributor

    To not make this a breaking change, I would suggest that this behavior is toggleable using an argument passed to start. We already use a similar pattern for shutdown where the process exits if the flag is set to true (which is the default behavior from legacy reasons).

  3. self-assigned this
    on Sep 11, 2024
  4. moved this from Next 🌟 to Done 🚀 in Serverpod Frameworkson Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions