diff options
author | Alexander Larsson <alexl@redhat.com> | 2018-07-10 16:32:42 +0200 |
---|---|---|
committer | Alexander Larsson <alexander.larsson@gmail.com> | 2018-07-10 19:26:16 +0200 |
commit | 50fd8aee2491fb34a1ccdccdcc660900d6af296c (patch) | |
tree | 9bbb2362155de1563771df6ba6e508c022a0cdc0 | |
parent | 0ac154e913cc9aa687afbb8b7e55f5a340ba6d16 (diff) | |
download | flatpak-50fd8aee2491fb34a1ccdccdcc660900d6af296c.tar.gz |
Add FLATPAK_ERROR_RUNTIME_NOT_FOUND error
-rw-r--r-- | common/flatpak-error.h | 2 | ||||
-rw-r--r-- | common/flatpak-transaction.c | 10 |
2 files changed, 8 insertions, 4 deletions
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; } |