<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Rafael, Lang<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 9, 2016, at 3:27 PM, Rafael Espíndola via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">If we ever get to the point were we really want to *return* more than</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">an error_code, it will be a much smaller refactoring to</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">s/CheckedError/TypedError/.</span></div></blockquote>So i think you’re right that we should use a CheckedError (ECError in Lang’s patch. I don’t mind on the final name), but since a CheckedError isa TypedError, seems like we don’t have anything to lose with the generality of TypedError.</div><div><br class=""></div><div>That is, if we provide TypedError as a base, then anyone can extend it as needed, and clients who only need ECError can use that. This is more or less covered in one of Lang’s patches where he changes the return type to TypedError, but the error being returned is 'return make_typed_error<ECError>(EC);’. If a client then decided to return something other than an ECError, you wouldn’t have to change that function return type, or any of its callers.</div><div><br class=""></div><div>Cheers,</div><div>Pete</div><br class=""></div></body></html>