svn: r538
This commit is contained in:
Philippe Meunier 2005-08-02 21:35:13 +00:00
parent b7e0b9d664
commit ed76966f53
3 changed files with 13 additions and 12 deletions

View File

@ -19,14 +19,16 @@
; string assoc-set value -> void
(define (raise-key-not-found-exn fct-name assoc-set key)
(raise (make-exn:assoc-set:key-not-found
(format "~a: key ~a not found in associative set ~a" fct-name key assoc-set)
(string->immutable-string
(format "~a: key ~a not found in associative set ~a" fct-name key assoc-set))
(current-continuation-marks)
assoc-set key)))
; string assoc-set value -> void
(define (raise-duplicate-key-exn fct-name assoc-set key)
(raise (make-exn:assoc-set:duplicate-key
(format "~a: key ~a already in associative set ~a" fct-name key assoc-set)
(string->immutable-string
(format "~a: key ~a already in associative set ~a" fct-name key assoc-set))
(current-continuation-marks)
assoc-set key)))

View File

@ -168,9 +168,6 @@
(drscheme:get/extend:extend-unit-frame
(lambda (super%)
(class super%
(inherit get-definitions-text get-current-tab)
; -> void
; -> void
(define/augment (enable-evaluation)
(inner cst:void enable-evaluation)
@ -184,7 +181,7 @@
(super-instantiate ())
(inherit get-button-panel get-interactions-text)
(inherit get-button-panel get-definitions-text get-interactions-text get-current-tab)
(define analyze-button
(instantiate
button% ()
@ -194,6 +191,7 @@
(lambda (button event)
(let ([start-time (current-milliseconds)]
[definitions-text (get-definitions-text)]
[current-tab (get-current-tab)]
[drs-eventspace (current-eventspace)]
[interactions-text (get-interactions-text)]
[language-settings
@ -257,7 +255,7 @@
; is not called here, but is called internally inside
; init-snips-and-arrows-gui
(disable-evaluation)
(send (get-current-tab) clear-annotations)
;(send current-tab clear-annotations)
; note: we have to do this each time, because the user might have changed
; the language between analyses.

View File

@ -3,12 +3,11 @@
; so we can't use contracts here because the sets are not always the same.
(module set-exn mzscheme
(provide
exn:set
exn:set?
(struct exn:set:value-not-found (set value))
(struct exn:set:duplicate-value (set value))
exn:set
exn:set?
raise-value-not-found-exn
raise-duplicate-value-exn
)
@ -20,14 +19,16 @@
; string set value -> void
(define (raise-value-not-found-exn fct-name set value)
(raise (make-exn:set:value-not-found
(format "~a: value ~a not found in set ~a" fct-name value set)
(string->immutable-string
(format "~a: value ~a not found in set ~a" fct-name value set))
(current-continuation-marks)
set value)))
; string set value -> void
(define (raise-duplicate-value-exn fct-name set value)
(raise (make-exn:set:duplicate-value
(format "~a: value ~a already in set ~a" fct-name value set)
(string->immutable-string
(format "~a: value ~a already in set ~a" fct-name value set))
(current-continuation-marks)
set value)))