Changeset

9559:7c65e3f38e6e

util.promise: Switch from pcall to xpcall to get tracebacks on exceptions
author Matthew Wild <mwild1@gmail.com>
date Fri, 26 Oct 2018 16:09:25 +0100
parents 9558:5fa73fbb047f
children 9560:cb92e1c8b6db
files util/promise.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/promise.lua	Fri Oct 26 09:23:31 2018 +0100
+++ b/util/promise.lua	Fri Oct 26 16:09:25 2018 +0100
@@ -15,7 +15,7 @@
 		return default;
 	end
 	return function (param)
-		local ok, ret = pcall(f, param);
+		local ok, ret = xpcall(f, debug.traceback, param);
 		if ok then
 			resolve(ret);
 		else