vl-catch-all-apply


(vl-catch-all-apply 'function [ list ] )

This function calls function with an (optional) argument list, and catches any potential Lisp error; this allows the Lisp code to handle such errors, without cancelling the Lisp execution.

Arguments

function  (symbol) name of a Lisp function (native or DEFUN or LAMBDA) to be called
list  (optional, list) list of arguments to be used for the function call

Return

result of the function call, if the function call succeeds;
returns an error object if the function call fails

Example

(setq res (vl-catch-all-apply 'strcat '("aaa" 123)))  returns #<catch-all-apply-error>
(vl-catch-all-error-p res)  returns T

Remarks

see (vl-catch-all-error-p) and (vl-catch-all-error-message) functions



©  Bricsys NV. All rights reserved.