diff --git a/collects/profj/libs/java/lang/Object-composite.ss b/collects/profj/libs/java/lang/Object-composite.ss index 252a597605..6bcb288dae 100644 --- a/collects/profj/libs/java/lang/Object-composite.ss +++ b/collects/profj/libs/java/lang/Object-composite.ss @@ -947,6 +947,21 @@ ; -> string (define/override (my-name) "Throwable") + (define/override (field-names) + (cond + [(and (null? cause) + (equal? "" (send message get-mzscheme-string))) null] + [(null? cause) (list "message")] + [(equal? "" (send message get-mzscheme-string)) (list "cause")] + [else (list "message" "cause")])) + (define/override (field-values) + (cond + [(and (null? cause) + (equal? "" (send message get-mzscheme-string))) null] + [(null? cause) (list message)] + [(equal? "" (send message get-mzscheme-string)) (list cause)] + [else (list message cause)])) + (super-instantiate ()))) ;(make-java-exception string continuation-mark-set Throwable) diff --git a/collects/profj/tester.scm b/collects/profj/tester.scm index 3280426852..5c1bd79cab 100644 --- a/collects/profj/tester.scm +++ b/collects/profj/tester.scm @@ -77,7 +77,7 @@ (set-single-test-covered-exprs! current-class (cons src (single-test-covered-exprs current-class))) - (when (and (testcase-ext?) src) + (when (and (testcase-ext?) src (not (null? current-test-obj))) (send current-test-obj testCoverage-boolean-int #f (src-pos src)))) (define/public (provide-test-results)