racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
444 stars 93 forks source link

Show the X button for exn:fail:user with prop:exn:srclocs #582

Closed sorawee closed 1 year ago

sorawee commented 1 year ago

I have an error that interfaces end users, so I don't want to show the stacktrace (esp. in the command-line). exn:fail:user fits this purpose. However, when given prop:exn:srclocs on top of exn:fail:user, the jump to error "X" button is gone too. It would be nice if that's not the case.

sorawee commented 1 year ago

This is the relevant code: https://github.com/racket/drracket/blob/master/drracket/drracket/private/debug.rkt#L369

rfindler commented 1 year ago

I'm happy with a slightly different predicate there. Is this the "x" in the REPL you want to show? So you want the call to display-srclocs-in-error to happen?

sorawee commented 1 year ago

Yes, I want display-srclocs-in-error to be called. What I don't know is whether it should be unconditionally called, or whether it should be called for (1) non-exn:fail:user OR (2) something with prop:exn:srclocs

rfindler commented 1 year ago

@sorawee is what I pushed what you have in mind? the program in the test case in the commit message is my attempt to distill the original bug report into a small example.

sorawee commented 1 year ago

Yep, that appears to be what I had in mind. So I will close the issue as fixed.