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

[REBOL] Re: Centralise error trapping in REBOL/View applications

From: Izkata:Comcast at: 5-Aug-2007 10:55

If the only reason for the error handling is to prevent the end user from seeing the error, this is a crude workaround that I've used every once in a while. Just stick it at the beginning of the initial script: if unset? get/any 'RandomUnusedVariable [ RandomUnusedVariable: true ;So the next line doesn't get stuck while [error? Err: try [do read %Start.r][ write %Errors.txt join mold disarm Err {^/^/} ] ] (Start.r being the initial script in this example) Typically, (That is, with nearly all of my scripts) the error message seems to be just as detailed as if the 'try was in the script itself. On Sun, 2007-08-05 at 16:41 +0200, Rudolf W. MEIJER wrote: