It may be that you're seeing the "clever"ness of the DrRacket repl. If the
last character printed is a newline, it only shows it when there is another
character after the newline.

Robby

On Thu, Aug 27, 2020 at 5:18 PM Sorawee Porncharoenwase <
sorawee.pw...@gmail.com> wrote:

> For stacktrace, use error-print-context-length to suppress it:
>
> (define (print-exn exn)
>   (parameterize ([error-print-context-length 0])
>     ((error-display-handler)
>      (if (exn? exn)
>          (exn-message exn)
>          (format "~a" exn))
>      exn)))
>
> I don’t see any extra newline though.
>
> On Thu, Aug 27, 2020 at 3:11 PM Shriram Krishnamurthi <shri...@gmail.com>
> wrote:
>
>> This is perfect, thanks!
>>
>> Two follow-up questions:
>>
>> 1. The error printer seems to print an extra newline at the end relative
>> to what the port-display-handler (for instance) shows. Is there a way to
>> suppress that?
>>
>> 2. The stack trace seems to be extracted automatically. Is there a way to
>> suppress it entirely?
>>
>> Shriram
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/racket-users/CAJUf2yQyVat2Fy63hdDqRv9iaq40Zsf_6TQJsLU%3DETB30zCE0Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/racket-users/CAJUf2yQyVat2Fy63hdDqRv9iaq40Zsf_6TQJsLU%3DETB30zCE0Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CADcuegsxbKF6CZi01J0mduxo9vS5U2QDjn5M-jA12h21NB02PA%40mail.gmail.com
> <https://groups.google.com/d/msgid/racket-users/CADcuegsxbKF6CZi01J0mduxo9vS5U2QDjn5M-jA12h21NB02PA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdONWoR-hLAudmCwAkcCoUzHG98kX47yHcsqnH%2B0nS9jViA%40mail.gmail.com.

Reply via email to