diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2024-06-04 23:48:59 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2024-06-04 23:48:59 -0300 |
commit | dba1285ca98d7a325f05b77b805089b3edd61867 (patch) | |
tree | f5ddfbd1c86a7db464dc1c459c38c5e256e49089 /test/interp-error.cratera | |
parent | 5eecbd6ef771a54b455d96f4033212062d7c3f8f (diff) |
Implement cratera REPL
Diffstat (limited to 'test/interp-error.cratera')
-rw-r--r-- | test/interp-error.cratera | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/interp-error.cratera b/test/interp-error.cratera new file mode 100644 index 0000000..cf177ed --- /dev/null +++ b/test/interp-error.cratera @@ -0,0 +1,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 |