Files
FlaxEngine/Source/Engine/Scripting/ManagedCLR/MException.h
Wojtek Figat 510fc443e8 Refactor CoreCLR runtime into explicit dotnet api instead of mocking mono api
Required by platforms that will use mono under the hood for .Net 7
New `USE_CSHARP` define for C# ability
Engine doesn't use `mono_*` apis directly but via MCore/MClass/MMethod/ apis
2023-03-27 17:29:42 +02:00

50 lines
1.3 KiB
C++

// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Core/Types/String.h"
#include "Engine/Core/Log.h"
#include "MTypes.h"
/// <summary>
/// Represents errors that occur during script execution.
/// </summary>
class FLAXENGINE_API MException
{
public:
/// <summary>
/// Gets a message that describes the current exception.
/// </summary>
String Message;
/// <summary>
/// Gets a string representation of the immediate frames on the call stack.
/// </summary>
String StackTrace;
/// <summary>
/// Gets an inner exception. Null if not used.
/// </summary>
MException* InnerException;
public:
/// <summary>
/// Initializes a new instance of the <see cref="MException"/> class.
/// </summary>
/// <param name="exception">The exception object.</param>
explicit MException(MObject* exception);
/// <summary>
/// Disposes a instance of the <see cref="MException"/> class.
/// </summary>
~MException();
public:
/// <summary>
/// Sends exception to the log.
/// </summary>
/// <param name="type">The log message type.</param>
/// <param name="target">Execution target name.</param>
void Log(const LogType type, const Char* target);
};