[REBOL] Re: Coerting Errors to a string?
From: nitsch-lists:netcologne at: 21-Dec-2001 3:23
RE: [REBOL] Coerting Errors to a string?
(original by Bo somewhere, called print-error. forgot if i changed something.)
form-error: func [
error [object!]
/local arg1 arg2 arg3 message out
] [
out: make string! 100
set [arg1 arg2 arg3] [error/arg1 error/arg2 error/arg3]
message: get in get in system/error error/type error/id
if block? message [bind message 'arg1]
append out reform reduce message
append out reform ["^/Near:" mold error/near]
append out reform ["^/Where:" mold get in error 'where]
]
use with [print form-error disarm error]
-Volker
[philb--upnaway--com] wrote: