From b40a984ed9b6a948265e1287ecc08f4e16c64ecd Mon Sep 17 00:00:00 2001 From: Jokler Date: Wed, 28 Feb 2018 01:21:25 +0100 Subject: Create errors with failure The plugins are mostly not using the new errors yet and the error handling in the Factoids plugin is just temporary. --- src/plugins/factoids/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/factoids/utils.rs') diff --git a/src/plugins/factoids/utils.rs b/src/plugins/factoids/utils.rs index fc86fb3..036dcc6 100644 --- a/src/plugins/factoids/utils.rs +++ b/src/plugins/factoids/utils.rs @@ -10,8 +10,8 @@ use self::LuaError::RuntimeError; pub fn download(_: &Lua, url: String) -> Result { match utils::download(1024, &url) { - Some(v) => Ok(v), - None => Err(RuntimeError(format!("Failed to download {}", url))), + Ok(v) => Ok(v), + Err(e) => Err(RuntimeError(format!("Failed to download {} - {}", url, e.to_string()))), } } -- cgit v1.2.3-70-g09d2