UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
InstallerError.fake.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
6
7#if WITH_DEV_AUTOMATION_TESTS
8
9namespace BuildPatchServices
10{
12 : public IInstallerError
13 {
14 public:
15 virtual bool HasError() const override
16 {
17 return bHasError;
18 }
19
20 virtual bool IsCancelled() const override
21 {
22 return bIsCancelled;
23 }
24
25 virtual bool CanRetry() const override
26 {
27 return bCanRetry;
28 }
29
30 virtual EBuildPatchInstallError GetErrorType() const override
31 {
32 return ErrorType;
33 }
34
35 virtual FString GetErrorCode() const override
36 {
37 return ErrorCode;
38 }
39
40 virtual FText GetErrorText() const override
41 {
42 return ErrorText;
43 }
44
46 {
47 ErrorType = InErrorType;
48 ErrorCode = InErrorSubType + ((InErrorCode > 0) ? FString::Printf(TEXT("-%u"), InErrorCode) : TEXT(""));
49 ErrorText = MoveTemp(InErrorText);
50 }
51
52 virtual int32 RegisterForErrors(FOnErrorDelegate Delegate)
53 {
54 int32 Handle = HandleCount++;
55 Delegates.Add(Handle, Delegate);
56 return Handle;
57 }
58
59 virtual void UnregisterForErrors(int32 Handle) override
60 {
61 Delegates.Remove(Handle);
62 }
63
64 virtual void Reset() override
65 {
66 bHasError = false;
67 bIsCancelled = false;
68 bCanRetry = true;
70 ErrorCode = TEXT("");
71 ErrorText = FText::GetEmpty();
72 // To mimic real imp, delegates are kept.
73 }
74
75 public:
76 bool bHasError;
77 bool bIsCancelled;
78 bool bCanRetry;
80 FString ErrorCode;
81 FText ErrorText;
83 int32 HandleCount;
84 };
85}
86
87#endif //WITH_DEV_AUTOMATION_TESTS
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EBuildPatchInstallError
Definition IBuildInstaller.h:23
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Text.h:385
static CORE_API const FText & GetEmpty()
Definition Text.cpp:252
Definition UnrealString.h.inl:34
Definition BuildPatchFileConstructor.h:28
FDelegates Delegates
Definition NavigationSystemBase.cpp:234