aboutsummaryrefslogtreecommitdiff
path: root/lib/core
diff options
context:
space:
mode:
Diffstat (limited to 'lib/core')
-rw-r--r--lib/core/errors.nom12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/core/errors.nom b/lib/core/errors.nom
index 8027228..a84b580 100644
--- a/lib/core/errors.nom
+++ b/lib/core/errors.nom
@@ -25,7 +25,7 @@ use "core/control_flow"
local _a, _b = \($a as lua expr), \($b as lua expr)
if _a ~= _b then
at_1_fail(\(quote "\($a.source)"),
- "Assumption failed: This value was "..tostring(_a).." when it was supposed to be "..tostring(_b)..".")
+ "Assumption failed: This value was "..tostring(_a).." but it was expected to be "..tostring(_b)..".")
end
end
")
@@ -35,7 +35,7 @@ use "core/control_flow"
local _a, _b = \($a as lua expr), \($b as lua expr)
if _a == _b then
at_1_fail(\(quote "\($a.source)"),
- "Assumption failed: This value was "..tostring(_a).." when it wasn't supposed to be.")
+ "Assumption failed: This value was "..tostring(_a).." but it wasn't expected to be.")
end
end
")
@@ -76,10 +76,10 @@ test:
Lua ("
do
local _fell_through = false
- local _result = {pcall(function()
+ local _result = {xpcall(function()
\($action as lua)
_fell_through = true
- end)}
+ end, enhance_error)}
if _result[1] then
\$success_lua
else
@@ -123,10 +123,10 @@ test:
(do $action then always $final_action) compiles to ("
do -- do/then always
local _fell_through = false
- local _results = {pcall(function()
+ local _results = {xpcall(function()
\($action as lua)
_fell_through = true
- end)}
+ end, enhance_error)}
\($final_action as lua)
if not _results[1] then error(_results[2], 0) end
if not _fell_through then return table.unpack(_results, 2) end