FString FBuildPatchInstallError::GetErrorString() { FScopeLock ScopeLock( &ThreadLock ); FString ReturnString = ToString(); if ( HasFatalError() ) { ReturnString += TEXT( " " ); ReturnString += ErrorString; } return ReturnString; }
void FBuildPatchInstallError::SetFatalError( const EBuildPatchInstallError::Type& ErrorType, const FString& ErrorLog ) { FScopeLock ScopeLock( &ThreadLock ); // Only accept the first error if( HasFatalError() ) { return; } if( ErrorType != EBuildPatchInstallError::NoError) { // Log first as the fatal error GWarn->Logf( TEXT( "BuildDataGenerator: FATAL ERROR: %s, %s" ), *ToString( ErrorType ), *ErrorLog ); } else { // Log any that follow, but they are likely caused by the first GWarn->Logf( TEXT( "BuildDataGenerator: Secondary error: %s, %s" ), *ToString( ErrorType ), *ErrorLog ); } ErrorState = ErrorType; ErrorString = ErrorLog; }
bool Error::HasError() const { return HasFatalError() || !m_strError.empty(); }