source: project/release/3/locale/trunk/locale-errors.scm @ 13852

Last change on this file since 13852 was 13852, checked in by Kon Lovett, 12 years ago

Added errors file.

File size: 732 bytes
Line 
1;;;; locale-components.scm
2;;;; Kon Lovett, May '06
3
4(declare
5  (usual-integrations)
6  (fixnum)
7  (inline)
8  (no-procedure-checks)
9  (no-bound-checks)
10  (export
11    type-error) )
12
13;;;
14
15
16;;
17
18(define (make-exn-condition loc msg . args)
19  (make-property-condition 'exn 'message msg 'location loc 'arguments args) )
20
21(define (make-type-error-message typmsg)
22  (string-append "bad argument type - expected " typmsg) )
23
24(define (type-condition) (make-property-condition 'type))
25
26(define (make-type-error-condition loc typmsg bad)
27  (make-composite-condition
28   (make-exn-condition loc (make-type-error-message typmsg) bad)
29   (type-condition)) )
30
31(define (type-error loc typmsg bad)
32  (abort (make-type-error-condition loc typmsg bad)) )
Note: See TracBrowser for help on using the repository browser.