UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BlueprintExceptionInfo.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "Misc/Optional.h"
7
8// Kinds of Blueprint exceptions
24
25// Information about a blueprint exception
27{
28public:
33
39
41 {
42 return EventType;
43 }
44
45 const FText& GetDescription() const
46 {
47 if (!Description.IsSet())
48 {
49 Description = FText();
50 }
51 return Description.GetValue();
52 }
53
54private:
56
57 // We use TOptional<FText> here as an optimization for the common case of an exception with no text.
58 // For instance, every tracepoint in the code creates a FBlueprintExceptionInfo with no description.
59 // Constructing an empty FText will take a reference on the shared FText::GetEmpty() string, which
60 // is especially expensive in AutoRTFM because we need to track reference-count updates in order to
61 // undo them. If the caller actually inspects the empty description, we synthesize it on demand.
62 mutable TOptional<FText> Description;
63};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition Text.h:385
Definition BlueprintExceptionInfo.h:10
Type
Definition BlueprintExceptionInfo.h:12
@ WireTracepoint
Definition BlueprintExceptionInfo.h:15
@ Tracepoint
Definition BlueprintExceptionInfo.h:14
@ AccessViolation
Definition BlueprintExceptionInfo.h:16
@ UserRaisedError
Definition BlueprintExceptionInfo.h:21
@ AbortExecution
Definition BlueprintExceptionInfo.h:20
@ NonFatalError
Definition BlueprintExceptionInfo.h:18
@ Breakpoint
Definition BlueprintExceptionInfo.h:13
@ InfiniteLoop
Definition BlueprintExceptionInfo.h:17
@ FatalError
Definition BlueprintExceptionInfo.h:19
Definition BlueprintExceptionInfo.h:27
EBlueprintExceptionType::Type GetType() const
Definition BlueprintExceptionInfo.h:40
FBlueprintExceptionInfo(EBlueprintExceptionType::Type InEventType)
Definition BlueprintExceptionInfo.h:29
FBlueprintExceptionInfo(EBlueprintExceptionType::Type InEventType, const FText &InDescription)
Definition BlueprintExceptionInfo.h:34
const FText & GetDescription() const
Definition BlueprintExceptionInfo.h:45
Definition Optional.h:131
constexpr OptionalType & GetValue()
Definition Optional.h:443
constexpr bool IsSet() const
Definition Optional.h:69