Changeset 10343


Ignore:
Timestamp:
11/04/05 11:34:18 (16 years ago)
Author:
piso
Message:

(defmethod print-object ((c type-error) stream) ...): use FORMAT-CONTROL if available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/print-object.lisp

    r10334 r10343  
    22;;;
    33;;; Copyright (C) 2003-2005 Peter Graves
    4 ;;; $Id: print-object.lisp,v 1.10 2005-11-03 17:02:55 piso Exp $
     4;;; $Id: print-object.lisp,v 1.11 2005-11-04 11:34:18 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    7272  (if *print-escape*
    7373      (call-next-method)
    74       (format stream "The value ~S is not of type ~S."
    75               (type-error-datum c)
    76               (type-error-expected-type c))))
     74      (if (slot-boundp c 'format-control)
     75          (apply 'format stream
     76                 (simple-condition-format-control c)
     77                 (simple-condition-format-arguments c))
     78          (format stream "The value ~S is not of type ~S."
     79                  (type-error-datum c)
     80                  (type-error-expected-type c)))))
    7781
    7882(defmethod print-object ((c simple-condition) stream)
Note: See TracChangeset for help on using the changeset viewer.