Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Better error messages?

From: rotenca:telvia:it at: 7-Dec-2001 13:45

Hi Gabriele,
> > Thanks for that. But i was wondering if there was something better,
something
> > more precise. Most other languages you can pinpoint a failure to the line. > > Rebol just seems to give a hint. > > Once a script is loaded in memory, there aro no more "lines", so > REBOL cannot help you that. It tells you the name of the function > where the error happened, howver.
I disagree: REBOL could help. The near field of error object could be better: it could store a pointer to the block code where the error happens not a fixed length 5 copy of it. With this copy we only could try to identify the exact point using local words if at least one of them appears in the near block. With a pointer in many cases (not always) we could go back and forward to view the context of failing code. At least, the lenght of copy should be changed by user. The near pointer is so bad that sometimes it never shows the exact point of error, because of len 5:
>> err: disarm try [1 / 3 / 5 / 0] err/near
== [1 / 3 / 5] --- Ciao Romano