Changeset 6612


Ignore:
Timestamp:
May 25, 2007, 5:37:58 AM (18 years ago)
Author:
Gary Byers
Message:

PROCESS-DEBUG-CONDITION for event-process errors (hey, it's a start.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ide-1.0/ccl/examples/cocoa-window.lisp

    r6587 r6612  
    108108        (#/performSelectorOnMainThread:withObject:waitUntilDone:
    109109         *NSApp* (@selector "postEventAtStart:") e  t)))))
     110
     111
     112(defparameter *debug-in-event-process* t)
     113
     114(defmethod process-debug-condition ((process appkit-process) condition frame-pointer)
     115  "Better than nothing.  Not much better."
     116  (when *debug-in-event-process*
     117    (catch 'need-a-catch-frame-for-backtrace
     118      (let* ((*debug-in-event-process* nil)
     119             (context (new-backtrace-info nil
     120                                          frame-pointer
     121                                          (if *backtrace-contexts*
     122                                            (or (child-frame
     123                                                 (bt.youngest (car *backtrace-contexts*))
     124                                                 nil)
     125                                                (last-frame-ptr))
     126                                            (last-frame-ptr))
     127                                          (%current-tcr)
     128                                          condition
     129                                          (%current-frame-ptr)
     130                                          #+ppc-target *fake-stack-frames*
     131                                          #+x86-target (%current-frame-ptr)
     132                                          (db-link)
     133                                          (1+ *break-level*)))
     134             (*backtrace-contexts* (cons context *backtrace-contexts*))) 
     135        (format t "~%~%*** Error in event process: ~a~%~%" condition)
     136        (print-call-history :context context :detailed-p t :count 20 :origin frame-pointer)
     137        (format t "~%~%~%")
     138        (force-output t)
     139        ))))
    110140
    111141
     
    243273                      (push attr-name implemented-attributes))))))
    244274            (values (#/retain font) implemented-attributes))))))
     275
    245276
    246277;;; Create a paragraph style, mostly so that we can set tabs reasonably.
Note: See TracChangeset for help on using the changeset viewer.