Rebol 编程/throw-error
外观
< Rebol 编程
THROW-ERROR err-type err-id args
使用提供的的信息立即抛出错误。
THROW-ERROR 是一个函数值。
- err-type -- (类型:词语)
- err-id -- (类型:词语)
- args -- (类型:任何)
throw-error: func [
{Causes an immediate error throw with the provided information.}
err-type [word!]
err-id [word!]
args
][
parse args: compose [(:args)] [0 3 [args: any-function! (
change/only args copy/deep third first args
) | skip]]
args: head args
throw make error! reduce [err-type err-id pick args 1 pick args 2 pick args 3]
]