Skip to content

Ability to handle errors #23

@Troplo

Description

@Troplo

Hi,

When this package checks for updates, the Flutter app will crash due to an unhandled exception if the update server can't be reached. I don't currently see a method to allow you to hook into exceptions to handle them.

It's not currently possible to add a try-catch when running init() manually as the call to checkVersion() is not asynchronous, therefore the app will crash so I'd like to see the ability to handle errors in the future, unless I'm missing something and it's possible already but it doesn't look like it due to how it's architected.

I think that adding an onError callback to the class constructor would be a good solution, something like:

DesktopUpdaterController(
  onError: (error) {
    // Handling implementation
  }
);

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions