From: Wolfgang Bangerth Date: Thu, 13 Apr 2023 20:55:13 +0000 (-0600) Subject: Better document ExcFunctionNonzeroReturn exception. X-Git-Tag: v9.5.0-rc1~333^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4075747b41f9ff08ae61483219aadf88a9c6d4fa;p=dealii.git Better document ExcFunctionNonzeroReturn exception. --- diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index 28745c7fc9..2b9a7c14a1 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -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.