From df4fa4b95453ebaff0a24e25f09b522b6b0a2e12 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 26 Mar 2017 15:16:18 +0100 Subject: [PATCH 1/1] src/class-utilities.lisp: Improve reporting of multiple root classes. Organization: Straylight/Edgeware From: Mark Wooding --- src/class-utilities.lisp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/class-utilities.lisp b/src/class-utilities.lisp index 38cb75e..5b3021f 100644 --- a/src/class-utilities.lisp +++ b/src/class-utilities.lisp @@ -212,10 +212,15 @@ (defun find-root-superclass (class) (sod-class-chains super))) supers))) (list class)))) - (cond ((null roots) (error "Class ~A has no root class!" class)) - ((cdr roots) (error "Class ~A has multiple root classes ~ - ~{~A~#[~; and ~;, ~]~}" - class roots)) + (cond ((null roots) + (error "Class ~A has no root class!" class)) + ((cdr roots) + (cerror* "Class ~A has multiple root classes ~ + ~{~#[~;~A~;~A and ~A~:; ~@{~A, ~#[~;and ~A~]~}~]~}" + class roots) + (let ((state (make-inheritance-path-reporter-state class))) + (dolist (root roots) + (report-inheritance-path state root)))) (t (car roots))))) (export 'find-root-metaclass) -- [mdw]