release 0.1.0

This commit is contained in:
rus07tam 2026-05-06 12:21:06 +03:00
commit 30d94536a9
90 changed files with 7722 additions and 0 deletions

22
modules/core/error.owa Normal file
View file

@ -0,0 +1,22 @@
(seq
(fn throw! []
(throw.runtime_error! (str.join "" %%)))
(fn panic! [v]
(throw.panic! v))
(fn unreachable! []
(throw! "Reached unreachable code"))
(fn not_implemented! []
(throw! "Not implemented"))
(def try builtins.errors.try)
(defmacro catch [pattern then]
(lambda [msg type] (if-eq (type $pattern)
$then
:null)))
(namespace throw
(def panic! builtins.errors.throw_panic)
(def type_error! builtins.errors.throw_type_error)
(def arity_error! builtins.errors.throw_arity_error)
(def runtime_error! builtins.errors.throw_runtime_error)
))