If thrown does not have a message attribute, use what was thrown instead.

Fixes 'undefined' error message in log when using throw "error"
This commit is contained in:
Nathan Gray 2014-02-05 17:19:18 +00:00
parent ec7360d36f
commit 66cddfbd61

View File

@ -904,7 +904,7 @@ function etemplate2_handle_assign(type, res, req)
} }
catch (e) catch (e)
{ {
egw.debug("error", "When assigning %s on %s via AJAX, \n"+e.message,res.data.key,res.data.id,widget); egw.debug("error", "When assigning %s on %s via AJAX, \n"+(e.message||e+""),res.data.key,res.data.id,widget);
} }
} }
return false; return false;