MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
PlainTextComponent.h
Go to the documentation of this file.
1/** @noop License Comment
2 * @file
3 * @copyright
4 * This Source Code is subject to the terms of the Mozilla Public License, v2.0.
5 * If a copy of the MPL was not distributed with this file You can obtain one at
6 * https://mozilla.org/MPL/2.0/
7 *
8 * @author David Mórász
9 * @date 2025
10 */
11
12#pragma once
13
14#include "CoreMinimal.h"
15#include "Mcro/Error.h"
16
17namespace Mcro::Error
18{
19 /** @brief An error component which displays only its Message, used as simple modular plain text storage */
20 class MCRO_API IPlainTextComponent : public IError
21 {
22 protected:
23 virtual void AddError(const FString& name, const TSharedRef<IError>& error, const FString& typeOverride = {}) override {}
24 virtual void SerializeInnerErrors(YAML::Emitter&) const override {}
25
26 virtual void SerializeYaml(YAML::Emitter& emitter) const override;
27 virtual TSharedRef<SErrorDisplay> CreateErrorWidget() override;
28 };
29
30}
A base class for a structured error handling and reporting with modular architecture and fluent API.
Definition Error.h:68
An error component which displays only its Message, used as simple modular plain text storage.
virtual TSharedRef< SErrorDisplay > CreateErrorWidget() override
Override this function to customize how an error is displaxed for the end-user.
virtual void AddError(const FString &name, const TSharedRef< IError > &error, const FString &typeOverride={}) override
Override this method if inner errors added to current one needs special attention.
virtual void SerializeInnerErrors(YAML::Emitter &) const override
Override this method if inner errors needs custom way of serialization.
virtual void SerializeYaml(YAML::Emitter &emitter) const override
Override this function to change the method how this error is entirely serialized into a YAML format.
Contains utilities for structured error handling.
Definition Error.Fwd.h:19