From: Stas Boukarev Date: Fri, 27 Apr 2012 23:54:47 +0000 (+0400) Subject: Better error messages to condition signalling functions. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=f1f283e6bee12b7d70bcec52aa226d0532a490fb;p=sbcl.git Better error messages to condition signalling functions. --- diff --git a/src/code/condition.lisp b/src/code/condition.lisp index 3562d0c..bbeac70 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -264,7 +264,8 @@ (condition-classoid type) (class ;; Punt to CLOS. - (return-from make-condition (apply #'make-instance type args))) + (return-from make-condition + (apply #'make-instance type args))) (classoid (error 'simple-type-error :datum type @@ -275,7 +276,8 @@ (error 'simple-type-error :datum type :expected-type 'condition-class - :format-control "Bad type argument:~% ~S" + :format-control + "~s doesn't designate a condition class." :format-arguments (list type))))) (res (make-condition-object args))) (setf (%instance-layout res) (classoid-layout class)) diff --git a/src/code/error.lisp b/src/code/error.lisp index 7270941..e701982 100644 --- a/src/code/error.lisp +++ b/src/code/error.lisp @@ -52,8 +52,9 @@ (error 'simple-type-error :datum datum :expected-type '(or symbol string) - :format-control "bad argument to ~S: ~S" - :format-arguments (list fun-name datum))))) + :format-control "Condition designator ~s is not of type ~s." + :format-arguments (list datum + '(or symbol string)))))) (define-condition layout-invalid (type-error) ()