Seriously!
Wouldn't it be great if we could MANUALLY crash a proc, giving our own error message?
Just a thought... but it would be neat!
ID:138375
Sep 23 2000, 6:51 am
|
|
In response to Guy T.
|
|
On 9/23/00 11:20 am Guy T. wrote:
Wouldn't it be great if we could MANUALLY crash a proc, giving our own error message? Well, actually, I wanted it more to give the call stack. The lines don't matter because the error will occur in a library which might lead people to believe its my fault and not theirs if it reports a bad argument type or something. |
In response to Spuzzum
|
|
On 9/23/00 11:56 am Spuzzum wrote:
On 9/23/00 11:20 am Guy T. wrote: Actually, you could probably simulate this by using __FILE__ and __LINE__. I'd like to throw in my support for this one -- many's the time I wished I could force a crash and see the stack as I was debugging... |
Actually, you could probably simulate this by using __FILE__ and __LINE__. But I haven't learned enough about style sheets yet to know whether you could force this to output the message in the user's custom "system message" color. Could be worth a look, though... I'd envision it being used like so:
proc/blabla()
if(prob(50))
CustomErr(usr, __FILE__, __LINE__, "Random bug detected")
return
usr << "No errors here!"