mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-19 01:24:53 -05:00
Log error when a result fails to load
findOrLoadKnownScalarResultForTimeStep asserted when the reader failed to load a result. A result listed in the meta data that cannot be read from file is a run-time condition, not a programming error, and aborted the application in builds with asserts enabled. Report the failing result name and time step through RiaLogging instead.
This commit is contained in:
@@ -1809,8 +1809,9 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
|
||||
|
||||
if ( !resultLoadingSuccess )
|
||||
{
|
||||
// Error logging
|
||||
CAF_ASSERT( false );
|
||||
// A result present in the meta data can still fail to load from file. This is a run-time condition, not a
|
||||
// programming error, so report it instead of asserting.
|
||||
RiaLogging::error( QString( "Failed to load result '%1' for time step %2" ).arg( resultName ).arg( timeStepIndex ).toStdString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user