changeset 321:376357c84189

Adds condition for invalid arguments Ignore-this: acfe927d2c4491bce0cb0e603bb70392 darcs-hash:20100607105400-13bc2-298f67835349379005b43825ea47aec6121f03f3.gz
author Thomas Praetzlich <io901tp@gold.ac.uk>
date Mon, 07 Jun 2010 11:54:00 +0100
parents 6c57b16a7829
children 51389b0db7fe
files base/conditions.lisp
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/base/conditions.lisp	Fri Jun 04 16:39:23 2010 +0100
+++ b/base/conditions.lisp	Mon Jun 07 11:54:00 2010 +0100
@@ -32,3 +32,14 @@
 		     (insufficient-information-operation condition)))))
 
 	   
+(define-condition invalid-argument (condition)
+  ;; This condition applies if a function is invoked with an invalid
+  ;; argument.
+  ((function :initarg :function
+	     :reader invalid-argument-function)
+   (argument :initarg :argument
+	     :reader invalid-argument-argument))
+   (:report (lambda (condition stream)
+	      (format stream "The function ~A is not defined for a call with ~A"
+		      (invalid-argument-function condition)
+		      (invalid-argument-argument condition)))))
\ No newline at end of file