Skip to content
Turtle Kitty edited this page Jul 12, 2016 · 4 revisions

error

This procedure calls the current error continuation with an error object consisting of a name, form, and message.

(error <name> <form> <message>)

is equivalent to

(fail
    (object 'type error
            'name <name>
            'form <form>
            'message <message>
            'view (list 'error <name> <form> <message>)
            'to-text <message>))
(error 'not-found %(foo bar baz) "Missing item!")
    -> (error not-found (foo bar baz) "Missing item!")

Most procedures in the global prelude use this rather than the more primitive fail.

Clone this wiki locally