From f1f283e6bee12b7d70bcec52aa226d0532a490fb Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Sat, 28 Apr 2012 03:54:47 +0400 Subject: [PATCH] Better error messages to condition signalling functions. --- src/code/condition.lisp | 6 ++++-- src/code/error.lisp | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) 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) () -- 1.7.10.4