Function Entry: ERROR
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: ERROR
Name
error
Class
Function
Syntax
(error message)
Arguments and Values
message— a string (or any value) describing the error.
Description
Signals an AutoLISP error from user code: the current evaluation aborts as
for any runtime error, *error* handlers run, and vl-catch-all-apply traps
it as a catch-all error object.
Neither vendor documents this function, but BricsCAD provides it (see
Tested Behaviour), and the message of the error it signals is the text of
message. AutoCAD has none: resolving the symbol fails with "no function
definition: ERROR" – an error raised while resolving the operator, which can
escape vl-catch-all-apply. Code that must also run on AutoCAD raises with an
operation that fails on every host instead (alfe's CAD-side runtime defines
alfe-error for this; see
issues/closed/alfe-autocad-error-primitive-masks-load-failure.issue).
Return Values
Does not return normally.
Side Effects
Aborts the running evaluation; *error* handlers may run.
Tested Behaviour
BricsCAD V26 / macOS (pjb, 2026-10-15):
erroris a function and its message is its argument:(vl-catch-all-error-message (vl-catch-all-apply (function (lambda () (error "How do you do"))) nil)) => "How do you do"
It is assumed present in the other BricsCAD versions and platforms; the BricsCAD Developer Reference (V22-V25) has no page for it.
- BricsCAD V25 / Windows (job 17033123930) and V26 / macOS (job 17034595786):
the encoding probe reports
error-primitive.bound = yes. - AutoCAD 2022 / Windows: no
errorfunction. The deported loader failed with "no function definition: ERROR" (SCHME+ pipeline 86651), and the encoding probe'serror-primitive.boundisno(jobs 16776117747, 17033123931). probes/sources/probe-error-function.lsprecords(type error)and the message of(error "x")on every vendor host it runs on.
Availability
- AutoCAD 2022: not available (no function definition: ERROR).
- AutoCAD 2026: not documented.
- BricsCAD V26: available, undocumented; verified on macOS.
- Status: BricsCAD-only (undocumented); clautolisp provides it too.
clautolisp
clautolisp implementation deviation – not part of the normative specification above.
clautolisp provides error as a builtin under every dialect, with BricsCAD's
semantics: the message of the error it signals is the text of message. It
is a BricsCAD operator (chapter 25, case 1, extension) that clautolisp also
adopts as its own extension: a call emits the once-per-session
[vendor-operator] notice (ERROR is a BricsCAD-only operator) under
--autocad and --strict, and is silent under --bricscad, --clautolisp
and --lax; the call proceeds in every dialect
(issues/closed/clautolisp-error-silent-under-autocad.issue).