IndieGame/client/Packages/com.unity.inputsystem@1.7.0/InputSystem/Utilities/ExceptionHelpers.cs

17 lines
452 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
using System;
namespace UnityEngine.InputSystem.Utilities
{
internal static class ExceptionHelpers
{
public static bool IsExceptionIndicatingBugInCode(this Exception exception)
{
Debug.Assert(exception != null, "Exception is null");
return exception is NullReferenceException ||
exception is IndexOutOfRangeException ||
exception is ArgumentException;
}
}
}