LCOV - code coverage report

Current view
top level - src/exceptions - squadron_timeout_exception.dart
Test
lcov.info
Date
2024-11-13
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines1919100.0%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import 'package:cancelation_token/cancelation_token.dart';
2import 'package:meta/meta.dart';
3
4import '_well_known_exceptions.dart';
5import 'squadron_canceled_exception.dart';
6import 'squadron_exception.dart';
7
8class SquadronTimeoutException extends SquadronCanceledException
9 implements TimeoutCanceledException {
106 SquadronTimeoutException(String tokenId, String message, this.duration,
11 [StackTrace? stackTrace])
126 : super(tokenId, message, stackTrace);
13
14 @override
15 final Duration? duration;
16
173 @override
187 List serialize() => List.unmodifiable([
19 $timeoutExceptionType,
204 tokenId,
214 message,
227 stackTrace?.toString(),
234 duration?.inMicroseconds,
241 ]);
25}
26
27const _$type = 0;
28const _$tokenId = 1;
29const _$message = 2;
30const _$stackTrace = 3;
31const _$duration = 4;
32
33@internal
34extension SquadronTimeoutExceptionExt on SquadronTimeoutException {
355 static SquadronTimeoutException? deserialize(List? props) {
362 if (props == null) return null;
378 if (props[_$type] != $timeoutExceptionType) return null;
385 final microSecs = (props[_$duration] as num?)?.toInt();
395 return SquadronTimeoutException(
405 props[_$tokenId],
415 props[_$message],
422 (microSecs == null) ? null : Duration(microseconds: microSecs),
438 SquadronException.loadStackTrace(props[_$stackTrace]),
44 );
452 }
46}
Choose Features