source: project/release/4/locale/trunk/locale-errors.scm @ 15641

Last change on this file since 15641 was 15641, checked in by Kon Lovett, 11 years ago

Save

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