You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb wouter.burgers #jira UE-181418 #preflight 642ece61df6c5c78fc9b99c9 - Added FSourceControlResultInfo::EAdditionalErrorContext that describes additional info about errors that the operation might have encountered that the caller can poll for rather than trying to parse error strings. -- NOTE that we cannot enforce this info to be provided by source control provider implementations so this additional info should only be used to improve error messages. -- Initially we support the connection to the provider failing and the connection to the provider dropping mid operation. - Moved FSourceControlResultInfo to its own code files. - I wanted to move the implementation of FSourceControlResultInfo::Append to the cpp, but this causes linker problems even with SOURCECONTROL_API as some modules are not including source control properly. For now I have left it in the header file and will look into this in another code pass. [CL 24943799 by paul chipchase in ue5-main branch]
28 lines
860 B
C++
28 lines
860 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SourceControlResultInfo.h"
|
|
|
|
#include "Internationalization/Internationalization.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "SourceControlResultInfo"
|
|
|
|
void FSourceControlResultInfo::OnConnectionFailed()
|
|
{
|
|
ErrorMessages.Add(LOCTEXT("ConnectionFailed", "Failed to connect to the server"));
|
|
AdditionalErrorContext |= EAdditionalErrorContext::ConnectionFailed;
|
|
}
|
|
|
|
void FSourceControlResultInfo::OnConnectionDroped()
|
|
{
|
|
ErrorMessages.Add(LOCTEXT("ConnectionFailed", "Connection to the server dropped"));
|
|
AdditionalErrorContext |= EAdditionalErrorContext::ConnectionDropped;
|
|
}
|
|
|
|
bool FSourceControlResultInfo::DidConnectionFail() const
|
|
{
|
|
return EnumHasAnyFlags(AdditionalErrorContext, EAdditionalErrorContext::ConnectionFailed |
|
|
EAdditionalErrorContext::ConnectionDropped);
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|