From 534ad97e08a9725fb4c9618f47602d7e83583600 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sat, 29 Oct 2011 15:35:57 +0300 Subject: [PATCH] change an AVER to CERROR 'bug Hopefully making it easier to debug. --- src/pcl/wrapper.lisp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/pcl/wrapper.lisp b/src/pcl/wrapper.lisp index 35ad695..ee29b2b 100644 --- a/src/pcl/wrapper.lisp +++ b/src/pcl/wrapper.lisp @@ -177,11 +177,25 @@ ;; previous call to REGISTER-LAYOUT for a superclass of ;; INSTANCE's class. See also the comment above ;; FORCE-CACHE-FLUSHES. Paul Dietz has test cases for this. - (%force-cache-flushes (class-of instance)) - ;; KLUDGE avoid an infinite recursion, it's still better to - ;; bail out with an AVER for server softwares. see FIXME above. - ;; details: http://thread.gmane.org/gmane.lisp.steel-bank.devel/10175 - (aver (not (eq (layout-invalid (wrapper-of instance)) t))) + (let ((class (wrapper-class* owrapper))) + (%force-cache-flushes class) + ;; KLUDGE: avoid an infinite recursion, it's still better to + ;; bail out with an error for server softwares. see FIXME above. + ;; details: http://thread.gmane.org/gmane.lisp.steel-bank.devel/10175 + ;; + ;; Error message here is trying to figure out a bit more about the + ;; situation, since we don't have anything approaching a test-case + ;; for the bug. + (let ((new-state (layout-invalid (wrapper-of instance)))) + (unless (neq t new-state) + (cerror "Nevermind and recurse." 'bug + :format-control "~@" + :format-arguments (mapcar (lambda (x) + (cons x (layout-invalid x))) + (list owrapper + (wrapper-of instance) + (class-wrapper class))))))) (check-wrapper-validity instance)) ((consp state) (ecase (car state) -- 1.7.10.4