kyleect / locks

A toy language branched from Lox to learn language implementation and tooling. Forked from loxcraft
https://kyleect.github.io/locks/#/docs
MIT License
0 stars 0 forks source link

Error Handling: Exceptions + Try/Catch Or Types + Panic? #38

Open kyleect opened 11 months ago

kyleect commented 11 months ago

Have try/catch statements? Caught error types and catch overload? Rethrow and keep stack trace in tact Just use Result and pattern matching?

Try expressions?

var result = try {
  return 123;
} catch (e) {
  return 456;
}