Improve error messages

This commit is contained in:
kaso17 2017-02-28 16:57:29 +01:00
parent c08498d75c
commit c3e632d215
1 changed files with 5 additions and 2 deletions

View File

@ -273,11 +273,14 @@ namespace Jackett.Controllers
}
catch (Exception ex)
{
var msg = ex.Message;
if (ex.InnerException != null)
msg += ": " + ex.InnerException.Message;
logger.Error(ex, "Exception in test_indexer");
jsonReply["result"] = "error";
jsonReply["error"] = ex.Message;
jsonReply["error"] = msg;
if (indexer != null)
indexer.LastError = ex.Message;
indexer.LastError = msg;
}
return Json(jsonReply);
}