~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/clos/conditions.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Albin Tonnerre
  • Date: 2008-06-20 18:00:19 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080620180019-7fbz1ln5444vtkkr
Tags: 0.9j-20080306-2ubuntu1
* Enabled unicode support. (Closes: LP #123530)
* Modify Maintainer value to match the DebianMaintainerField specification.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;;;;  -*- Mode: Lisp; Syntax: Common-Lisp; Package: CLOS -*-
 
2
;;;;
1
3
;;;;  Copyright (c) 2001, Juan Jose Garcia-Ripoll
2
4
;;;;  Copyright (c) 1992, Giuseppe Attardi.
3
5
;;;;
42
44
  (declare (inline apply) ;; So as not to get bogus frames in debugger
43
45
           (ignore error-name))
44
46
  (let ((condition (coerce-to-condition datum args 'simple-error 'error)))
45
 
    (if continue-string
46
 
      (with-simple-restart
47
 
          (continue "~A" (format nil "~?" continue-string args))
48
 
        (signal condition)
49
 
        (invoke-debugger condition))
50
 
      (progn
51
 
        (signal condition)
52
 
        (invoke-debugger condition)))))
 
47
    (cond
 
48
      ((eq t continue-string)
 
49
       ; from CEerror; mostly allocation errors
 
50
       (with-simple-restart (ignore "Ignore the error, and try the operation again")
 
51
         (signal condition)
 
52
         (invoke-debugger condition)))
 
53
      ((stringp continue-string)
 
54
       (with-simple-restart
 
55
         (continue "~A" (format nil "~?" continue-string args))
 
56
         (signal condition)
 
57
         (invoke-debugger condition)))
 
58
      ((and continue-string (symbolp continue-string))
 
59
       ; from CEerror
 
60
       (with-simple-restart (accept "Accept the error, returning NIL")
 
61
         (multiple-value-bind (rv used-restart)
 
62
           (with-simple-restart (ignore "Ignore the error, and try the operation again")
 
63
             (multiple-value-bind (rv used-restart)
 
64
               (with-simple-restart (continue "Continue, using ~S" continue-string)
 
65
                 (signal condition)
 
66
                 (invoke-debugger condition))
 
67
 
 
68
               (if used-restart continue-string rv)))
 
69
           (if used-restart t rv))))
 
70
      (t
 
71
        (progn
 
72
          (signal condition)
 
73
          (invoke-debugger condition))))))
53
74
 
54
75
(defun sys::tpl-continue-command (&rest any)
55
76
  (apply #'invoke-restart 'continue any))