// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Debug/Exception.h"
#include "Engine/Scripting/Types.h"
namespace Log
{
///
/// The exception that is thrown when a method call is invalid in an object's current state.
///
class CLRInnerException : public Exception
{
public:
///
/// Init
///
CLRInnerException()
: CLRInnerException(String::Empty)
{
}
///
/// Creates default exception with additional data
///
/// Additional information that help describe error
CLRInnerException(const String& additionalInfo)
: Exception(String::Format(TEXT("Current {0} CLR method has thrown an inner exception"),
#if USE_MONO
TEXT("Mono")
#elif USE_NETCORE
TEXT(".NET Core")
#else
TEXT("Unknown engine")
#endif
), additionalInfo)
{
}
};
}