Open BookOwl opened 8 years ago
Need OOP first so that we have a good way to handle it :P
Future possible usage:
{ sup } try dup
`success -> /* property op? */
True =
{ 'All good!' print }
{ 'We got an error:' print `msg -> print }
ifelse
I was thinking more like
{ 'Try running this code' print }
{ /* If this gets run, the item on top of the stack is an error object */ 'An error occurred' print }
try
Works as well.
oop version thing:
{ 'Try running this code' print }
{ `msg -> `msg set 'Error: ' msg concat print }
try
It would probably be a good idea to add exception handling to Stack.