Open darianboggs opened 1 year ago
This came up again with PR #2326. For now, MAPL_GetResource
maintains the existing behavior, but it adds an optional, intent(out)
argument to MAPL_GetResource
so that existing code that handles the non-zero rc code can instead use the new argument to differentiate between a failure to set the value and a true error condition. Once the existing code is changed, MAPL_GetResource
should be changed to no longer treat failure to find as an error condition.
ESMF and MAPL use the optional
rc
argument to indicate success and failure in many procedures. MAPL provides an exception/error handling system through preprocessor macros (include files) and procedures which serves as a standard exception/error handling mechanism. In some cases, MAPL and science procedures use the system in a manner inconsistent with the intended use. In turn, this can create bugs when procedures are changed. Where reasonably possible, the inconsistent procedures should be identified and remedied, with a focus on MAPL procedures.