From d8f39a93614d2bd503d27cdf1b5a580533efb7cc Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Tue, 11 Aug 2009 12:58:29 +0100
Subject: [PATCH] improved error message

---
 .../surfaceSplitNonManifolds.C                   | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C
index 8608fe33af6..c14771030f4 100644
--- a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C
+++ b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C
@@ -157,14 +157,14 @@ void testSortedEdgeFaces(const triSurface& surf)
         {
             if (findIndex(sortMyFaces, myFaces[i]) == -1)
             {
-                FatalErrorIn("testSortedEdgeFaces") << abort(FatalError);
+                FatalErrorIn("testSortedEdgeFaces(..)") << abort(FatalError);
             }
         }
         forAll(sortMyFaces, i)
         {
             if (findIndex(myFaces, sortMyFaces[i]) == -1)
             {
-                FatalErrorIn("testSortedEdgeFaces") << abort(FatalError);
+                FatalErrorIn("testSortedEdgeFaces(..)") << abort(FatalError);
             }
         }
     }
@@ -304,7 +304,7 @@ label findEdge
     }
 
 
-    FatalErrorIn("findEdge") << "Cannot find edge with labels " << v0
+    FatalErrorIn("findEdge(..)") << "Cannot find edge with labels " << v0
         << ' ' << v1 << " in candidates " << edgeLabels
         << " with vertices:" << UIndirectList<edge>(surf.edges(), edgeLabels)()
         << abort(FatalError);
@@ -343,7 +343,7 @@ label otherEdge
         }
     }
 
-    FatalErrorIn("otherEdge") << "Cannot find other edge on face " << faceI
+    FatalErrorIn("otherEdge(..)") << "Cannot find other edge on face " << faceI
         << " verts:" << surf.localPoints()[faceI]
         << " connected to point " << pointI
         << " faceEdges:" << UIndirectList<edge>(surf.edges(), fEdges)()
@@ -409,7 +409,9 @@ void walkSplitLine
 
             if (eFaces.size() != 2)
             {
-                FatalErrorIn("walkSplitPoint") << abort(FatalError);
+                FatalErrorIn("walkSplitPoint(..)")
+                    << "Can only handle edges with 2 or 4 edges for now."
+                    << abort(FatalError);
             }
 
             if (eFaces[0] == faceI)
@@ -422,7 +424,7 @@ void walkSplitLine
             }
             else
             {
-                FatalErrorIn("walkSplitPoint") << abort(FatalError);
+                FatalErrorIn("walkSplitPoint(..)") << abort(FatalError);
             }
         }
         while (true);
@@ -547,7 +549,7 @@ void calcPointVecs
 
                 surf.write("errorSurf.ftr");
 
-                FatalErrorIn("calcPointVecs")
+                FatalErrorIn("calcPointVecs(..)")
                     << "Cannot find two faces using border edge " << edgeI
                     << " verts:" << edges[edgeI]
                     << " eFaces:" << eFaces << endl
-- 
GitLab