LCOV - code coverage report

Current view
top level - src/exceptions - squadron_error.dart
Test
lcov.info
Date
2024-11-13
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines131492.9%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import 'package:meta/meta.dart';
2
3import '_well_known_exceptions.dart';
4import 'squadron_exception.dart';
5
6/// Squadron Error
7class SquadronError extends SquadronException {
825 SquadronError._(super.message, [super.stackTrace]) : super.init();
9
102 @override
114 List serialize() => List.unmodifiable([
12 $squadronErrorType,
132 message,
144 stackTrace?.toString(),
150 ]);
16}
17
18const _$type = 0;
19const _$message = 1;
20const _$stackTrace = 2;
21
22@internal
23extension SquadronErrorExt on SquadronError {
2410 static SquadronError create(String message, [StackTrace? stackTrace]) =>
2515 SquadronError._(message, stackTrace);
26
277 static SquadronException? deserialize(List exceptionInfo) =>
289 (exceptionInfo[_$type] == $squadronErrorType)
297 ? SquadronError._(
307 exceptionInfo[_$message],
319 SquadronException.loadStackTrace(exceptionInfo[_$stackTrace]),
32 )
335 : null;
34}
Choose Features