<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Rafael,</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">What prevents you from using a diag handler in the jit server that<br>sends errors/warnings over the RPCChannel?</span></font></blockquote><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">What would you do with errors that can't reasonable be serialized when they reach the diagnostic handler?</div><div id="AppleMailSignature"><br></div>And what would you do with the serialized bytes on the client end?</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">- Lang.<br><br>Sent from my iPhone</div><div><br>On Feb 10, 2016, at 10:31 AM, Rafael EspĂndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><blockquote type="cite"><span>I recently added support for remote JITing to ORC. There are in-tree library</span><br></blockquote><blockquote type="cite"><span>facilities for JITing code into a process on the other end of an abstract</span><br></blockquote><blockquote type="cite"><span>"RPCChannel". What happens if something goes wrong at one end? We want to be</span><br></blockquote><blockquote type="cite"><span>able to communicate an error back across the RPCChannel (assuming it's still</span><br></blockquote><blockquote type="cite"><span>intact) so the other side can recover or fail gracefully. That means we need</span><br></blockquote><blockquote type="cite"><span>to be able to serialize an error with enough information to describe what</span><br></blockquote><blockquote type="cite"><span>went wrong. There's no practical way to maintain a serialization routine for</span><br></blockquote><blockquote type="cite"><span>all possible std::error_codes that might come up, even if they were powerful</span><br></blockquote><blockquote type="cite"><span>enough to describe everything that could go wrong (which again, being static</span><br></blockquote><blockquote type="cite"><span>kinds, they're not). With my proposal however, a JITError base class can be</span><br></blockquote><blockquote type="cite"><span>defined as:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>class JITError : public TypedErrorInfo<JITError> {</span><br></blockquote><blockquote type="cite"><span>public:</span><br></blockquote><blockquote type="cite"><span> virtual void serialize(RPCChannel &C) const = 0;</span><br></blockquote><blockquote type="cite"><span>};</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span></span><br><span>What prevents you from using a diag handler in the jit server that</span><br><span>sends errors/warnings over the RPCChannel?</span><br><span></span><br><span>Cheers,</span><br><span>Rafael</span><br></div></blockquote></body></html>