I can think of three things that should be easy to do and improve the error reporting situation:
Change the error in Get from String to SomeException. This will allow throwing custom exception types, which can carry along more information with them.
Add labels to the error path in Get. This will require adding a label combinator, and then actually use that all over the place. The labels would be a stack on the error in Get, and when an error actually occurs they could be output. This would allow the error to be oriented without requiring a call stack. (And indeed could include information that the call stack wouldn't have, like current frame index.)
Include more information when something goes wrong. When an error does get thrown, it should include at least the version of Rattletrap used. Perhaps it should also include some helpful text, like a link to this repo or something.
I can think of three things that should be easy to do and improve the error reporting situation:
Get
fromString
toSomeException
. This will allow throwing custom exception types, which can carry along more information with them.Get
. This will require adding alabel
combinator, and then actually use that all over the place. The labels would be a stack on the error inGet
, and when an error actually occurs they could be output. This would allow the error to be oriented without requiring a call stack. (And indeed could include information that the call stack wouldn't have, like current frame index.)