aboutsummaryrefslogtreecommitdiffstats
path: root/util/error.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/error.lua')
-rw-r--r--util/error.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/util/error.lua b/util/error.lua
index 00192273..976bc355 100644
--- a/util/error.lua
+++ b/util/error.lua
@@ -70,12 +70,10 @@ local function coerce(ok, err, ...)
return ok, err, ...;
end
- local new_err = setmetatable({
- native = err;
+ local new_err = new({
+ type = "cancel", condition = "undefined-condition"
+ }, { wrapped_error = err });
- type = "cancel";
- condition = "undefined-condition";
- }, error_mt);
return ok, new_err, ...;
end