ExceptionHelpers.cs 452 B

12345678910111213141516
  1. using System;
  2. namespace UnityEngine.InputSystem.Utilities
  3. {
  4. internal static class ExceptionHelpers
  5. {
  6. public static bool IsExceptionIndicatingBugInCode(this Exception exception)
  7. {
  8. Debug.Assert(exception != null, "Exception is null");
  9. return exception is NullReferenceException ||
  10. exception is IndexOutOfRangeException ||
  11. exception is ArgumentException;
  12. }
  13. }
  14. }