Skip to content

Conversation

@bennn
Copy link
Contributor

@bennn bennn commented Jul 30, 2017

Fix check-exn to print the user's message if they supplied one, rather than the generic "No exception raised".

I think I need #59 to test this. Until then here's some checks I'd use to test:

#lang racket/base
(require rackunit)

(check-not-exn (λ () (/ 1 0)) "don't divide by 0")

(check-exn exn:fail? (λ () (void)) "this should raise an exception")

(check-exn exn:fail:user? (λ () (error 'death)) "should be user exn")

All these should print a message: with the user's message rather than the generic ones.
(Racket 6.7 does this, Racket 6.10 candidate doesn't)

bennn added 2 commits July 30, 2017 19:30
Add `check-info-ref` and `check-info-contains-key?`,
 similar to `hash-ref`,
 but you can omit the "hashtable" argument --- by default its `(current-check-info)`
@bennn bennn changed the title Doc cis check-exn: stop ignore message argument Jul 31, 2017
@jackfirth jackfirth self-requested a review July 31, 2017 18:39
@bennn bennn merged commit 9803e2c into racket:master Jan 21, 2018
@bennn bennn deleted the doc-cis branch January 21, 2018 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant