diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-11-30 14:49:12 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-11-30 15:25:20 -0500 |
commit | aa0c6115638195b39eeca614cd28f7831c22dd0a (patch) | |
tree | 59db99877ce9e10550c0208276bb0a13987e2f5e /plugins/plugin_manager | |
parent | 7cfcdcea4b4a4984cd6625a60e9fc2a44d0ec9c9 (diff) | |
download | lite-xl-plugin-manager-aa0c6115638195b39eeca614cd28f7831c22dd0a.tar.gz lite-xl-plugin-manager-aa0c6115638195b39eeca614cd28f7831c22dd0a.zip |
Added in extra error handling.
Diffstat (limited to 'plugins/plugin_manager')
-rw-r--r-- | plugins/plugin_manager/init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/plugin_manager/init.lua b/plugins/plugin_manager/init.lua index 2fde4e3..3f27f96 100644 --- a/plugins/plugin_manager/init.lua +++ b/plugins/plugin_manager/init.lua @@ -200,7 +200,7 @@ function PluginManager:get_addons(options) else self:refresh(options):done(function() prom:resolve(self.addons) - end) + end):fail(function(arg) promise:reject(arg) end) end return prom end @@ -232,7 +232,7 @@ function PluginManager:unstub(addon, options) local unstubbed_addon = json.decode(result).addons[1] for k,v in pairs(unstubbed_addon) do addon[k] = v end promise:resolve(addon) - end) + end):fail(function(arg) promise:reject(arg) end) end return promise end @@ -256,7 +256,7 @@ function PluginManager:get_addon(name_and_version, options) end end if not match then promise:reject() end - end) + end):fail(function(arg) promise:reject(arg) end) return promise end |