summary refs log tree commit diff stats
path: root/test/interp-error.cratera
blob: cf177ed65cbb3b500da04074e7b2c5a11e9bd7c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
-- Test interpreter error handling.
if arg[1] == "nil" then
    error(nil)
elseif arg[1] == "string" then
    error("string")
elseif arg[1] == "table" then
    error({})
elseif arg[1] == "metaerror" then
    error(setmetatable({}, {__tostring=error}))
end