<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Nov 10, 2011, at 10:32 AM, Argyrios Kyrtzidis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>+ */<br>+enum CXLoadDiag_Error {<br>+ /**<br>+ * \brief Indicates that no error occurred.<br>+ */<br>+ CXLoadDiag_None = 0,<br>+ <br>+ /**<br>+ * \brief Indicates that an unknown error occurred while attempting to<br>+ * deserialize diagnostics.<br>+ */<br>+ CXLoadDiag_Unknown = 1,<br>+ <br>+ /**<br>+ * \brief Indicates that the file containing the serialized diagnostics<br>+ * could not be opened.<br>+ */<br>+ CXLoadDiag_CannotLoad = 2,<br>+ <br>+ /**<br>+ * \brief Indicates that the serialized diagnostics file is invalid or<br>+ * corrupt.<br>+ */<br>+ CXLoadDiag_InvalidFile = 3<br>+};<br></div></blockquote><div><br></div><div>CXLoadDiag_Error seems useful for other functions that load a file as well, like the one that reads an AST file, the one that reads file remappings, etc.</div><div>Maybe change it to CXLoadFile_Error so it can be reused ?</div></div></div></span></blockquote></div><br><div>I'm leery of having a "one error code to rule them all." What you end up getting is a union of all error cases, which don't apply to everything. That means that clients of a specific API need to handle all the cases (if they care about error handling) even when only a fraction of them make sense.</div></body></html>