From 2a8e8676b34c6c34003e3afdb34ea4f7ff98bdbe Mon Sep 17 00:00:00 2001 From: Sourabh Bhat Date: Tue, 6 Feb 2024 18:14:06 +0100 Subject: [PATCH] Additional information in case of error while reading mesh file --- src/main/mesh/factory/Unstructured3DMesh.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/mesh/factory/Unstructured3DMesh.java b/src/main/mesh/factory/Unstructured3DMesh.java index 61aaf7c..adb4658 100644 --- a/src/main/mesh/factory/Unstructured3DMesh.java +++ b/src/main/mesh/factory/Unstructured3DMesh.java @@ -84,7 +84,8 @@ public Unstructured3DMesh(File meshFile, int numVars, Map new IllegalStateException("Couldn't locate boundary face in mesh.")); + .orElseThrow(() -> new IllegalStateException("Couldn't locate boundary face in mesh.\n" + + "The error occurred while reading '" + bndName + "' boundary.")); bndFace.right = Mesh.ghostCell(bndFace.left, bndFace); bndFaces.add(bndFace); }