<div dir="ltr">I suppose this is a non-answer, but it shouldn't be hard at all to write a "with-error-as-exception" form. I generally believe it's idiomatic to extend the language whenever something inconvenient, or whenever a boilerplate "design pattern", comes up.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 13, 2015 at 4:27 PM, Jack Firth <span dir="ltr"><<a href="mailto:jackhfirth@gmail.com" target="_blank">jackhfirth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm using racket/system to make some calls to other processes, which upon failure write to standard error. What's the proper way to handle this? I've been using with-output-to-string to get the output, but I don't know how I can turn an error response from the external system command into something in Racket I can work with. Is there some idiomatic with-error-as-exception form or something similar that says "if this thunk writes to standard error, throw an exception with the output in the message"?</div>
<br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>