diff --git a/common/flatpak-error.h b/common/flatpak-error.h index 252c8a42..ab05bc9c 100644 --- a/common/flatpak-error.h +++ b/common/flatpak-error.h @@ -41,6 +41,7 @@ G_BEGIN_DECLS * @FLATPAK_ERROR_SKIPPED: The App/Runtime install was skipped due to earlier errors. * @FLATPAK_ERROR_NEED_NEW_FLATPAK: The App/Runtime needs a more recent version of flatpak. * @FLATPAK_ERROR_REMOTE_NOT_FOUND: The specified remote was not found. + * @FLATPAK_ERROR_RUNTIME_NOT_FOUND: An runtime needed for the app was not found. * * Error codes for library functions. */ @@ -53,6 +54,7 @@ typedef enum { FLATPAK_ERROR_SKIPPED, FLATPAK_ERROR_NEED_NEW_FLATPAK, FLATPAK_ERROR_REMOTE_NOT_FOUND, + FLATPAK_ERROR_RUNTIME_NOT_FOUND, } FlatpakError; #define FLATPAK_ERROR flatpak_error_quark () diff --git a/common/flatpak-transaction.c b/common/flatpak-transaction.c index 1fa13b02..2566fe5b 100644 --- a/common/flatpak-transaction.c +++ b/common/flatpak-transaction.c @@ -1186,8 +1186,9 @@ find_runtime_remote (FlatpakTransaction *self, if (remotes == NULL || *remotes == NULL) { - flatpak_fail (error, _("The Application %s requires the %s which was not found"), - app_pref, runtime_pref); + flatpak_fail_error (error, FLATPAK_ERROR_RUNTIME_NOT_FOUND, + _("The Application %s requires the %s which was not found"), + app_pref, runtime_pref); return NULL; } @@ -1201,8 +1202,9 @@ find_runtime_remote (FlatpakTransaction *self, if (res >= 0 && res < g_strv_length (remotes)) return g_strdup (remotes[res]); - flatpak_fail (error, _("The Application %s requires the %s which is not installed"), - app_pref, runtime_pref); + flatpak_fail_error (error, FLATPAK_ERROR_RUNTIME_NOT_FOUND, + _("The Application %s requires the %s which is not installed"), + app_pref, runtime_pref); return NULL; }