Ignore:
Timestamp:
01/24/05 14:00:08 (17 years ago)
Author:
asimon
Message:

Hack for printing conditions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/debug.lisp

    r7885 r8391  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: debug.lisp,v 1.28 2004-10-01 13:12:17 piso Exp $
     4;;; $Id: debug.lisp,v 1.29 2005-01-24 14:00:08 asimon Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    7373  (when condition
    7474    (fresh-line *debug-io*)
    75     (with-standard-io-syntax
    76       (when (and *load-truename* (streamp *load-stream*))
     75    (let* ((type (type-of condition))
     76           (report-function (get type 'sys::condition-report-function)))
     77      (with-standard-io-syntax
     78        (when (and *load-truename* (streamp *load-stream*))
     79          (sys:simple-format *debug-io*
     80                             "Error loading ~A at line ~D (offset ~D).~%"
     81                             *load-truename*
     82                             (stream-line-number *load-stream*)
     83                             (stream-offset *load-stream*)))
    7784        (sys:simple-format *debug-io*
    78                            "Error loading ~A at line ~D (offset ~D).~%"
    79                            *load-truename*
    80                            (stream-line-number *load-stream*)
    81                            (stream-offset *load-stream*)))
    82       (sys:simple-format *debug-io*
    83                          (if (fboundp 'tpl::repl)
    84                              "Debugger invoked on condition of type ~A:~%"
    85                              "Unhandled condition of type ~A:~%")
    86                          (type-of condition))
    87       (sys:simple-format *debug-io* "  ~A~%" condition))))
     85                           (if (fboundp 'tpl::repl)
     86                               "Debugger invoked on condition of type ~A:~%"
     87                               "Unhandled condition of type ~A:~%")
     88                           type)
     89        (if report-function
     90            (funcall report-function condition *debug-io*)
     91            (sys:simple-format *debug-io* "  ~A~%" condition))))))
    8892
    8993(defun invoke-debugger (condition)
Note: See TracChangeset for help on using the changeset viewer.