Feature #1793
Use ErrorContext instead of string FnName
Description
There is now a class
ErrorContext
and macro CoCoA_ERROR_CONTEXT
for recording:
- function name
- file name
- line number
Consider using ErrorContext
instead of a string for FnName
.
NB C++20 seems to offer an official version of ErrorContext
Related issues
History
#1 Updated by John Abbott about 1 month ago
- Related to Bug #1726: Dangling references to temporaries added
#2 Updated by John Abbott about 1 month ago
- Status changed from New to In Progress
- % Done changed from 0 to 60
While resolving issue #1726 I needed to call some arg-check functions specifying where in the source the arg-check was called.
By chance I noticed that we have ErrorContext
and the macro (since when? Is there any doc?)
I have modified most calls, but left the old code sommented out -- hope to delete in a couple of weeks.
See also documentation about std::source_location
for instance at the following linkhttps://en.cppreference.com/w/cpp/utility/source_location
#3 Updated by John Abbott about 1 month ago
- Related to Design #1792: CpuTimeOut: arg of type ErrorContext? added
#4 Updated by John Abbott about 1 month ago
- Target version changed from CoCoALib-0.99850 to CoCoALib-0.99880
#5 Updated by Anna Maria Bigatti about 1 month ago
Added also to NewFreeModuleForSyz.
#6 Updated by Anna Maria Bigatti about 1 month ago
- Related to Design #582: Error codes: use same code for "not poly ring" and "not elem poly ring" added