Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: void OnExceptionRetry<TException>(Action, int, int)

  • Declared in: RT.Util.Ut

Declaration

public static void OnExceptionRetry<TException>(
    Action action,
    int attempts = 3,
    int delayMs = 333
)

Summary

Evaluates the specified code. If the code throws TException, retries the specified number of times. The final attempt is executed without any exception handlers.

Generic type parameters

TException
  • Must derive from: System.Exception.
This type parameter is not documented.

Parameters

Actionaction The code to be executed.
intattempts The maximum number of times to retry action before giving up.
intdelayMs Delay, in milliseconds, before retrying action.