Re: How to handle these warnings?
Sam Steingold <[email protected]> Thu, 19 Oct 2017 15:32:01 -0400
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
> * Jean Louis <[email protected]> [2017-10-19 10:58:38 +0300]: > > On Wed, Jul 19, 2017 at 11:12:51AM -0400, Sam Steingold wrote: >> > * Jean Louis <[email protected]> [2017-07-19 10:49:18 +0300]: >> > >> > Is there any way to disable it temporarily? >> >> http://clisp.org/impnotes/mop-clisp.html#mop-clisp-warn >> >>>>> When CLISP encounters suspicious CLOS code, it issues a WARNING of >>>>> type CLOS:CLOS-WARNING. To suppress the undesired warnings (not >>>>> recommended!) use EXT:SET-GLOBAL-HANDLER with MUFFLE-WARNING on the >>>>> appropriate WARNING type;. To find where the warnings come from >>>>> (recommended), set *BREAK-ON-SIGNALS* to the appropriate WARNING >>>>> type. > > I have tried my best to understand, I do not get it. > > Can you help me with practical example on how to > use EXT:SET-GLOBAL-HANDLER with MUFFLE-WARNING on > the appropriate WARNING type? If you look at the doc for set-global-handler (https://clisp.sourceforge.io/impnotes/restarts.html#global-handler): >>>>> ... the macro EXT:ABORT-ON-ERROR is implemented by installing the following handler: >>>>> (defun sys::abortonerror (condition) >>>>> (sys::report-error condition) >>>>> (INVOKE-RESTART (FIND-RESTART 'ABORT condition))) This suggests the following: --8<---------------cut here---------------start------------->8--- (ext:set-global-handler 'clos:clos-warning (lambda (c) (invoke-restart (find-restart 'abort c)))) --8<---------------cut here---------------end--------------->8--- I am sorry that the doc was not clear enough. How can we improve it? (on the other hand, this is explicitly discouraged, so I am not sure we want to make this specific part clearer) -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://mideasttruth.com http://iris.org.il http://thereligionofpeace.com https://ffii.org Be sure brain is in gear before engaging mouth. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list