Re: How to handle these warnings?
Jean Louis <[email protected]> Fri, 20 Oct 2017 07:07:24 +0300
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Oct 19, 2017 at 03:32:01PM -0400, Sam Steingold wrote: > > * 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) I just want to suppress following errors below, and I am not sure if I am doing something or what is going on. My program works but after I see 3-4 screens of such warnings. rcd 0 errors, 0 warnings WARNING: Adding method #<STANDARD-METHOD (#<STANDARD-CLASS TEST-OP> (EQL #<SYSTEM "alexandria">))> to an already called generic function #<STANDARD-GENERIC-FUNCTION OPERATION-DONE-P> WARNING: Adding method #<STANDARD-METHOD (#<STANDARD-CLASS TEST-OP> (EQL #<SYSTEM "alexandria">))> to an already called generic function #<STANDARD-GENERIC-FUNCTION PERFORM> WARNING: Adding method #<STANDARD-METHOD (#<STANDARD-CLASS TEST-OP> (EQL #<SYSTEM "babel">))> to an already called generic function #<STANDARD-GENERIC-FUNCTION OPERATION-DONE-P> ----- End forwarded message ----- ------------------------------------------------------------------------------ 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