Skip to content

Commit

Permalink
Back to original xError() signature
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Sep 8, 2024
1 parent 0289604 commit 418e805
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/xchange.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ extern boolean xDebug; ///< Switch to enable debugging (very verbose) o
boolean xIsVerbose();
void xSetVerbose(boolean value);
void xSetDebug(boolean value);
int xError(int code, const char *fn);
int xError(const char *fn, int code);
const char *xErrorDescription(int code);

// Structure access methods ----------------------------------->
Expand Down
4 changes: 2 additions & 2 deletions src/xchange.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,12 @@ int xPrintFloat(char *str, float value) {
/**
* Prints a descriptive error message to stderr, and returns the error code.
*
* \param code The xchange error code that describes the failure (see xchange.h).
* \param fn String that describes the function or location where the error occurred.
* \param code The xchange error code that describes the failure (see xchange.h).
*
* \return Same error code as specified on input.
*/
int xError(int code, const char *fn) {
int xError(const char *fn, int code) {
switch(code) {
case X_SUCCESS: return 0;
case X_FAILURE: return x_error(code, ECANCELED, fn, "internal failure");
Expand Down

0 comments on commit 418e805

Please sign in to comment.