Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: bool OnExceptionRetryThenIgnore(Action, int, int)

  • Declared in: RT.Util.Ut

Declaration

public static bool OnExceptionRetryThenIgnore(
    Action action,
    int attempts = 3,
    int delayMs = 333
)

Summary

Evaluates the specified code. If the code throws any exceptions, retries the specified number of times. If the code still throws on the final attempt, suppresses the exception.

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.

Returns

True if action returned without exceptions, false if an exception was caught and suppressed on every attempt.