From: Stas B. <sta...@gm...> - 2013-04-29 19:31:12
|
Nikodemus Siivola <nik...@ra...> writes: > On 29 April 2013 20:23, stassats <sta...@us...> wrote: > > Much kudos for this patch! One thing struck my eye, though: > >> +(defmacro init-var-ignoring-errors (variable >> + form >> + &key default >> + explanation >> + (condition 'error)) >> + `(handler-case >> + (setf ,variable ,form) >> + (,condition (c) >> + (let ((default ,default)) >> + (warn "Error initializing ~a~@[ ~a~]:~@ >> + ~a >> + ~% Using ~s instead." >> + ',variable >> + ,explanation >> + c >> + default) >> + default)))) > > Should this not be > > `(setf ,variable (handler-case ...)) > > ? Now if there's an error variable won't be set at all. Right, of course. Thanks for the catch. -- With best regards, Stas. |