4082e824669d63eb61fee81424e179853e241c0e
__FILE__/__LINE__ are preprocessor macros - as default argument values in the header they expand once, at the header declaration site, not at each call site. Every throw relying on the defaults (all but File.cpp, which passed them explicitly) reported Exception.h itself instead of the real error location. Switched the defaults to std::source_location::current(), which the C++20 standard specifically defines to evaluate at the call site when used as a default argument - unlike macros. Kept the same 4-parameter signature so every existing call site, including ones that pass __FILE__/__LINE__ explicitly, is unaffected. Verified two ways: full-repo compile pass (identical result to before, 13/20 clean, same pre-existing StreamReader.h-blocked failures, nothing new broken); a real runtime test - a throw relying on defaults from a known line correctly reported that exact file/line via the caught exceptions .file/.line members. Test file not included in this commit.
Description
This repository contains the CoreUtils library. CoreUtils provides support for ServerCore, JetCore and other subsystem libraries used in higher functions.
33 MiB
0 Stars
1 Watchers
0 Forks
Languages
C++
97.8%
Makefile
1.9%
Shell
0.3%