Skip to content

Commit

Permalink
Merge pull request #15098 from bangerth/exc
Browse files Browse the repository at this point in the history
Better document ExcFunctionNonzeroReturn exception.
  • Loading branch information
marcfehling committed Apr 14, 2023
2 parents 24c2881 + 4075747 commit f5f72b0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions include/deal.II/base/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -863,10 +863,17 @@ namespace StandardExceptions
/**
* This exception is used if some user function returns nonzero exit codes.
*/
DeclException2(ExcFunctionNonzeroReturn,
std::string,
int,
<< "Function \"" << arg1 << "\" returned " << arg2);
DeclException2(
ExcFunctionNonzeroReturn,
std::string,
int,
<< "The function \"" << arg1 << "\" returned the nonzero value " << arg2
<< ", but the calling site expected the return value to be zero. "
"This error often happens when the function in question is a 'callback', "
"that is a user-provided function called from somewhere within deal.II "
"or within an external library such as PETSc, Trilinos, SUNDIALS, etc., "
"that expect these callbacks to indicate errors via nonzero return "
"codes.");

/**
* This exception is used if some object is found uninitialized.
Expand Down

0 comments on commit f5f72b0

Please sign in to comment.