Question

Let's say I type a stupid command in Rebol Console like

>> AWordThatMeansNothing
** Script Error: AWordThatMeansNothing has no value
** Near: AWordThatMeansNothing
>>

I want to intercept the above error to display another message or do anything I need to when I get an error in Console.

Was it helpful?

Solution

One way is to add a small front end to the console. Not perfect, but a start:

forever [
    if error? try [
        print do input][
           print "went bad!"
           ]
   ]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top