LCOV - code coverage report

Current view
top level - src/exceptions - squadron_canceled_exceptions.dart
Test
lcov.info
Date
2024-11-13
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines122352.2%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import 'dart:convert';
2
3import 'package:cancelation_token/cancelation_token.dart';
4import 'package:meta/meta.dart';
5
6import '_well_known_exceptions.dart';
7import 'squadron_canceled_exception.dart';
8
9class SquadronCanceledExceptions extends SquadronCanceledException
10 implements CanceledExceptions {
112 SquadronCanceledExceptions(
12 String tokenId, Iterable<SquadronCanceledException> exceptions)
132 : _exceptions = exceptions.toList(),
142 super(tokenId, '', null);
15
16 final List<SquadronCanceledException> _exceptions;
17
180 @override
190 Iterable<CanceledException> get innerExceptions => _exceptions;
20
210 @override
220 String get message => _exceptions.map((e) => e.message).join('\n');
23
240 @override
250 StackTrace? get stackTrace => null;
26
270 @override
280 String toString() => jsonEncode(serialize());
29
301 @override
313 List serialize() => List.unmodifiable([
32 $canceledExceptionsType,
332 tokenId,
3416 _exceptions.map((e) => e.serialize()).toList(),
351 ]);
36}
37
38const _$type = 0;
39const _$tokenId = 1;
40const _$innerExceptions = 2;
41
42@internal
43extension SquadronCanceledExceptionsExt on SquadronCanceledExceptions {
441 static SquadronCanceledExceptions? deserialize(List? props) {
450 if (props == null) return null;
462 if (props[_$type] != $canceledExceptionsType) return null;
470 return SquadronCanceledExceptions(
481 props[_$tokenId],
492 props[_$innerExceptions].map(SquadronCanceledExceptionExt.deserialize),
50 );
510 }
52}
Choose Features