IdentifyTimeoutException.fromException constructor

IdentifyTimeoutException.fromException({
  1. required PeerId peerId,
  2. required Object exception,
  3. Duration? timeout,
})

Creates an IdentifyTimeoutException from a generic exception.

This factory method helps convert generic timeout exceptions into typed IdentifyTimeoutException instances.

Implementation

factory IdentifyTimeoutException.fromException({
  required PeerId peerId,
  required Object exception,
  Duration? timeout,
}) {
  return IdentifyTimeoutException(
    peerId: peerId,
    message: 'Identify timeout for peer $peerId',
    timeout: timeout,
    cause: exception,
  );
}