elementary / sideload

Sideload Flatpaks on elementary OS
https://elementary.io
GNU General Public License v3.0
45 stars 14 forks source link

Handle error on constructing flatpak bundle, fix error signalling #143

Closed jeremypw closed 2 years ago

jeremypw commented 2 years ago

Fixes #136

When the bundle is created, the size is checked, if "0" this is an indication of an error and the error code and message are used to show an ErrorView. Two new FlatpakFile properties had to be introduced as signalling or throwing an error from a constructor is not possible (afaik).

Problems occur when passing error types as parameters of signals for some reason so instead fundamental types (int, string) are passed instead.

jeremypw commented 2 years ago

This was tested using the flatpak ref supplied by @danrabbit in the issue report. It was also tested by throwing fake errors instead of installing a genuine flatpak ref in /src/FlatpakFile.vala run_transaction_async () e.g. throw new Flatpak.Error.ALREADY_INSTALLED ("Fake error");

jeremypw commented 2 years ago

Screenshot from 2022-08-06 18 30 08