[Gd-chatter] r11506 - trunk/fundev/sources/dylan
cgay at gwydiondylan.org
cgay at gwydiondylan.org
Fri Nov 30 06:31:46 CET 2007
Author: cgay
Date: Fri Nov 30 06:31:45 2007
New Revision: 11506
Modified:
trunk/fundev/sources/dylan/class.dylan
Log:
Bug: 6598
Better error messages for <slot-type-error>: Dylan error: Incorrect
type for the #"s" init-keyword to {<class>: foo}. The given value,
's', is not of type {<class>: <integer>}.
Modified: trunk/fundev/sources/dylan/class.dylan
==============================================================================
--- trunk/fundev/sources/dylan/class.dylan (original)
+++ trunk/fundev/sources/dylan/class.dylan Fri Nov 30 06:31:45 2007
@@ -242,6 +242,19 @@
required-init-keyword: slot-descriptor:;
end;
+define method make
+ (class == <slot-type-error>, #rest keys, #key value, type, slot-descriptor)
+ => (error :: <slot-type-error>)
+ apply(next-method, class,
+ format-string: "Incorrect type for the %= init-keyword to %=. "
+ "The given value, %=, is not of type %=.",
+ format-arguments: list(slot-descriptor.init-keyword,
+ slot-descriptor.slot-owner,
+ value,
+ slot-descriptor.slot-type),
+ keys)
+end method make;
+
define function keyword-value
(descriptor :: <slot-descriptor>, iclass :: <implementation-class>,
init-args :: <simple-object-vector>)
@@ -269,7 +282,8 @@
format-arguments: list(iclass-class(iclass), descriptor.init-keyword)))
end if;
elseif (~instance?(keyword-value, slot-type(descriptor)))
- error(make(<slot-type-error>, value: keyword-value,
+ error(make(<slot-type-error>,
+ value: keyword-value,
type: slot-type(descriptor),
slot-descriptor: descriptor))
end if;
More information about the chatter
mailing list