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

[REBOL] Re: Better error messages?

From: g:santilli:tiscalinet:it at: 8-Dec-2001 17:44

Hello Sunanda! On 07-Dic-01, you wrote: [...] S> ** Script Error: Cannot use add on none! value S> ** Where: switch S> ** Near: Line-Count: Line-Count + 1 S> It tells me I'm in the middle of a switch statement, not the S> InitCode/DisplayScreen function. Could do better! Hmm... maybe the [throw] attibute could be used for that too... RT? Currently it does not work because the SWITCH function is no more special than your function; REBOL just know that the code that produces an error is running "inside" the SWITCH function. Maybe the solution would be to include a full stack dump instead of just providing the topmost function name. I.e.: a: func [] [make error! "Bomb!"] b: func [] [a] c: func [] [b] should give out: Where: [c b a] or something like that. S> I am specifically looking for a better quality error message S> for when the code has been deployed in the field. There will S> be bugs, and I don't want to spend the first half hour in S> solving a bug report simply trying to work out which function S> has the problem. Maybe we could just write a REP and send it to Carl? I think having a pointer in error/near and a stack dump in error/where should be rather easy to implement for RT. Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/