HomePhabricator

eolian: add library support for declaring and using errors

Authored by q66 on Jun 21 2019, 6:05 AM.

Description

eolian: add library support for declaring and using errors

You can now declare errors like this:

error Foo = "message"; documentation

Then you can use them as types like this:

foo {

return: error(Error1, Error2, ...);

}

They have a separate type category and storage. They are checked
for redefinitions the same as anything else though. This does
not add any generator support nor it adds any advanced checking.

Ref T6890

Details