Alternatively, I think you can simply supply a non-exception value to the
handler. This will suppress the red cross icon too, though.

(define (print-exn exn)
  ((error-display-handler)
   (if (exn? exn)
       (exn-message exn)
       (format "~a" exn))
   #f))


On Sat, Aug 29, 2020 at 8:17 AM Robby Findler <ro...@cs.northwestern.edu>
wrote:

> It might make the most sense for you to extract the exn-message and print
> it yourself? It should contain only the "a: undefined" part. If you want to
> selectively access the stacktrace and decide whether or not to print that
> first stackframe, that'll probably require a change to DrRacket, tho -- at
> least if you have debugging turned on. (There may be some clever hack I'm
> not thinking of, tho, depending on what you want.)
>
> Robby
>
> On Sat, Aug 29, 2020 at 10:11 AM Shriram Krishnamurthi <s...@cs.brown.edu>
> wrote:
>
>> Thank you!
>>
>> Is there a way of further suppressing info? Right now I get output like
>>
>> [image: image.png] ../../make-semantics.rkt:37:13: a: undefined
>>
>>
>> which is a reference to the language implementation file rather than to
>> the program in the language.
>>
>> The programs here are so small that suppressing everything but the "a:
>> undefined" would be great.
>>
>> --
>> 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/CAJUf2yQgBahzMQP-rPOAXM6xWkvAiR0EstzVNLweEYo83A6mEQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/racket-users/CAJUf2yQgBahzMQP-rPOAXM6xWkvAiR0EstzVNLweEYo83A6mEQ%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/CADcuegvwTnfHMTA91aPTFmLqX8dx695tW3wU9XMp6zs7jG49mw%40mail.gmail.com.

Reply via email to