开发者

Is it possible to intercept rebol's console error?

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 nee开发者_Python百科d to when I get an error in Console.


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!"
           ]
   ]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜