<div dir="ltr"><div><div>We were having a discussion today in the Northeastern lab about how the Racket stack traces sometimes don't give enough information, and the solution to the problem (errrortrace) is not very discoverable if you're not using DrRacket.<br><br>Here's an example of the kind of case I mean:<br><br>$ racket -t jpg.rkt <br>Assertion failed on #f<br>  context...:<br>   do-it<br>   /Users/acobb/programs/jpg-parse/jpg.rkt:402:2: for-loop<br>   decode-jpeg<br>   /Users/acobb/programs/jpg-parse/jpg.rkt: [running body]<br><br>$ racket -l errortrace -t jpg.rkt<br>Assertion failed on #f<br>  errortrace...:<br>   /Users/acobb/programs/jpg-parse/jpg.rkt:126:16: (assert #f)<br>   /Users/acobb/programs/jpg-parse/jpg.rkt:363:36: (huff-dc-decode dc-tree bits)<br>   /Users/acobb/programs/jpg-parse/jpg.rkt:407:37: (reader bits)<br></div><div>   <eliding for length><br></div><div>  context...:<br>   huff-dc-decode<br>   do-it<br>   /Users/acobb/programs/jpg-parse/jpg.rkt:406:5: for-loop<br>   /Users/acobb/programs/jpg-parse/jpg.rkt:402:2: for-loop<br>   decode-jpeg<br>   /Users/acobb/programs/jpg-parse/jpg.rkt: [running body]<br><br></div><div><br></div>To solve the discoverability issue, what would people think of putting a message like "If this information is not sufficient, try errrortrace with racket -l errortrace -t <prog>" after the default trace? Also, can anyone think of a way to programmatically detect when a trace is not informative enough and only display the message in those cases? I haven't looked into the feasibility of this myself; it's just an idea that came up during our discussion.<br></div></div>