retry package:streamly

retry takes 3 arguments
  1. A map m whose keys are exceptions and values are the number of times to retry the action given that the exception occurs.
  2. A handler han that decides how to handle an exception when the exception cannot be retried.
  3. The stream itself that we want to run this mechanism on.
When evaluating a stream if an exception occurs,
  1. The stream evaluation aborts
  2. The exception is looked up in m
a. If the exception exists and the mapped value is > 0 then, i. The value is decreased by 1. ii. The stream is resumed from where the exception was called, retrying the action. b. If the exception exists and the mapped value is == 0 then the stream evaluation stops. c. If the exception does not exist then we handle the exception using han. Internal
retry takes 3 arguments
  1. A map m whose keys are exceptions and values are the number of times to retry the action given that the exception occurs.
  2. A handler han that decides how to handle an exception when the exception cannot be retried.
  3. The stream itself that we want to run this mechanism on.
When evaluating a stream if an exception occurs,
  1. The stream evaluation aborts
  2. The exception is looked up in m
a. If the exception exists and the mapped value is > 0 then, i. The value is decreased by 1. ii. The stream is resumed from where the exception was called, retrying the action. b. If the exception exists and the mapped value is == 0 then the stream evaluation stops. c. If the exception does not exist then we handle the exception using han. Internal
See retry