Update error handling in Rimc* classes.

This commit is contained in:
Kristian Bendiksen committed 2025-05-12 17:31:48 +02:00
1 parent 135695fcb5
commit 752d4efc42
17 files changed
+136 -143

No files matched your search

@@ -232,7 +232,7 @@ std::expected<caf::PdmObjectHandle*, QString> RimcExtrudedCurveIntersection_geom
return triangleGeometry;
}
return new RimcTriangleGeometry;
return std::unexpected( "No intersection geometry found." );
}
//--------------------------------------------------------------------------------------------------
@@ -307,9 +307,7 @@ std::expected<caf::PdmObjectHandle*, QString> RimcExtrudedCurveIntersection_geom
auto eclView = intersection->firstAncestorOfType<RimEclipseView>();
if ( !eclView )
{
RiaLogging::error( "No Eclipse view found. Extraction of intersection result is only supported for "
"Eclipse view." );
return nullptr;
return std::unexpected( "No Eclipse view found. Extraction of intersection result is only supported for Eclipse view." );
}
RimEclipseResultDefinition* eclResultDef = nullptr;
@@ -337,7 +335,7 @@ std::expected<caf::PdmObjectHandle*, QString> RimcExtrudedCurveIntersection_geom
return RimcDataContainerDouble::create( values );
}
return new RimcDataContainerDouble();
return std::unexpected( "No intersection geometry result found." );
}
//--------------------------------------------------------------------------------------------------