Hi!
When developing on REBOL scripts a error happens from time to time. REBOL
then displays what happened and where it happened. The what is often quite
okay, but the where sucks.
Look at this example:
---
REBOL [] do %include.r include %html.r
return-stuff: func []
[
"Stuff"
]
return-empty: func []
[
]
print
[
HTML
[
Body [ BgColor "#000000" ]
[
]
]
HTML
[
Body [ BgColor "#000000" ]
[
return-stuff
]
]
HTML
[
Body [ BgColor "#000000" ]
[
return-empty
]
]
]
---
Now tell me where the error is:
---
>> do %where-is-the-bug.r
Script: "Untitled" (none)
Script: "Include" (8-Jun-1999)
Script: "HTML" (20-Jul-1999)
Script: "Nest" (9-Jul-1999)
** Script Error: form is missing its value argument.
** Where: form first block
---
So, where? form first block? Whats that? I had some error message of this
kind and it toooook me ages to debug. This is not REBOL-like.
Why can't it tell that the return-empty function is faulty? Why the heck
can't REBOL display a nice line number where the error happened? Even it
REBOL does not care about lines internally, it should provide some method
to provide exact reporting *where* an error is.
Apart from that I still don't understannd why Body [] works whereas Body [
return_empty] does not work....
print return-empty directly gives:
** Script Error: print is missing its value argument.
** Where: print return-empty
At least it gives a hint where is happened.
--
Martin 'Helios' Steigerwald - http://helios.home.pages.de
PGP: http://home.pages.de/~helios/autor/wie-erreichen.html