Changeset 15589 in project


Ignore:
Timestamp:
08/27/09 23:40:34 (10 years ago)
Author:
Kon Lovett
Message:

Rel 1.2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/check-errors

    r14289 r15589  
    9393</enscript>
    9494
     95==== make-error-type-message
     96
     97<procedure>(make-error-type-message TYPE-NAME [ARGUMENT-NAME]) => STRING</procedure>
     98
     99{{TYPE-NAME}} is a {{symbol}} or {{string}}. {{ARGUMENT-NAME}} is a {{string}}.
     100
     101Returns a type error message from the {{TYPE-NAME}} and optional {{ARGUMENT-NAME}}.
     102
     103Example:
     104
     105<enscript language=scheme>
     106(make-error-type-message 'integer "count") ;=> "bad `count' argument type - not an integer"
     107</enscript>
     108
    95109==== error-argument-type
    96110
    97111<procedure>(error-argument-type LOCATION OBJECT TYPE-NAME [ARGUMENT-NAME])</procedure>
    98112
    99 {{TYPE-NAME}} and {{ARGUMENT-NAME}} are {{string}}.
     113{{TYPE-NAME}} is a {{symbol}} or {{string}}. {{ARGUMENT-NAME}} is a {{string}}.
    100114
    101115Raises a {{type-error}} where is message is constructed from the {{TYPE-NAME}}
    102116and optional {{ARGUMENT-NAME}}.
    103 
    104 Example:
    105 
    106 <enscript language=scheme>
    107 (error-argument-type 'foo obj "integer" "count")
    108 ;=> "bad `count' argument - expected an integer"
    109 </enscript>
    110117
    111118==== error-fixnum
     
    333340==== define-check+error-type
    334341
    335 <syntax>(define-check+error-type TYPE [PREDICATE])</syntax>
     342<syntax>(define-check+error-type TYPE [PREDICATE [TYPE-NAME]])</syntax>
    336343
    337344Creates a procedure definition for {{check-TYPE}} with the signature of the
    338 above check procedures. The predicate is either {{PREDICATE}}, when present,
    339 or {{TYPE?}}.
     345above check procedures. The predicate is either {{PREDICATE}}, when present, or
     346{{TYPE?}}. The error message type-name is either the {{TYPE-NAME}}, when
     347present, or "{{TYPE}}".
    340348
    341349<enscript language=scheme>
     
    369377== Version history
    370378
     379; 1.2.0 : Added {{make-error-type-message}} & fixed {{define-check+error-type}}.
    371380; 1.1.0 : Added {{make-condition+}}, {{condition-property-accessor*}} and {{make-condition-property-accessor}}.
    372381; 1.0.0 : Initial release.
Note: See TracChangeset for help on using the changeset viewer.