diff --git a/collects/scribblings/reference/exns.scrbl b/collects/scribblings/reference/exns.scrbl index d418c8204c..22a765df94 100644 --- a/collects/scribblings/reference/exns.scrbl +++ b/collects/scribblings/reference/exns.scrbl @@ -406,7 +406,8 @@ it returns, an exception is raised (to be handled by an exception handler that reports both the original and newly raised exception). The default uncaught-exception handler prints an error message using -the current @tech{error display handler} (see @racket[error-display-handler]). +the current @tech{error display handler} (see @racket[error-display-handler]), +unless the argument to the handler is an instance of @racket[exn:break:hang-up]. If the argument to the handler is an instance of @racket[exn:break:hang-up] or @racket[exn:break:terminate], the default uncaught-exception handler then calls the @tech{exit handler} with @racket[1], which normally exits diff --git a/src/racket/src/error.c b/src/racket/src/error.c index 9c71f5377a..f016159fc0 100644 --- a/src/racket/src/error.c +++ b/src/racket/src/error.c @@ -783,9 +783,14 @@ call_error(char *buffer, int len, Scheme_Object *exn) scheme_set_cont_mark(scheme_exn_handler_key, v); scheme_push_break_enable(&cframe2, 0, 0); - p[0] = scheme_make_immutable_sized_utf8_string(buffer, len); - p[1] = exn; - scheme_apply_multi(display_handler, 2, p); + if (SCHEME_CHAPERONE_STRUCTP(exn) + && (scheme_is_struct_instance(exn_table[MZEXN_BREAK_HANG_UP].type, exn))) { + /* skip printout */ + } else { + p[0] = scheme_make_immutable_sized_utf8_string(buffer, len); + p[1] = exn; + scheme_apply_multi(display_handler, 2, p); + } if (SCHEME_CHAPERONE_STRUCTP(exn) && (scheme_is_struct_instance(exn_table[MZEXN_BREAK_HANG_UP].type, exn)