Internals: Redo post-error additional information to be part of error calls.

This commit is contained in:
Wilson Snyder
2025-05-10 16:20:12 -04:00
parent 0f528d136d
commit 680236b03e
17 changed files with 128 additions and 117 deletions
+8 -5
View File
@@ -233,13 +233,16 @@ void V3Graph::clearColors() {
//======================================================================
// Dumping
void V3Graph::loopsMessageCb(V3GraphVertex* vertexp) {
vertexp->v3fatalSrc("Loops detected in graph: " << vertexp);
void V3Graph::loopsMessageCb(V3GraphVertex* vertexp, V3EdgeFuncP edgeFuncp) {
vertexp->v3fatalSrc("Loops detected in graph: " << vertexp << "\n"
<< reportLoops(edgeFuncp, vertexp));
}
void V3Graph::loopsVertexCb(V3GraphVertex* vertexp) {
string V3Graph::loopsVertexCb(V3GraphVertex* vertexp) {
// Needed here as V3GraphVertex<< isn't defined until later in header
if (debug()) std::cerr << "-Info-Loop: " << cvtToHex(vertexp) << " " << vertexp << endl;
if (debug())
return "-Info-Loop: "s + cvtToHex(vertexp) + ' ' + cvtToStr(vertexp) + '\n';
else
return "";
}
void V3Graph::dump(std::ostream& os) const {