LCOV - code coverage report

Current view
top level - /src - squadron_error.dart
Test
lcov.info
Date
2022-04-02
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines1717100.0%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import 'dart:convert';
2
3import 'squadron_exception.dart';
4
5/// Squadron Error
6class SquadronError extends Error implements SquadronException {
72 SquadronError._(this.message) {
83 _localStackTrace = super.stackTrace;
91 }
10
11 /// Message (or string representation of the exception).
12 final String message;
13
14 static const _$type = 0;
15 static const _$message = 1;
16 static const _$stackTrace = 2;
17
18 static const _$typeMarker = '\$';
19
201 @override
214 List serialize() => [_$typeMarker, message, stackTrace?.toString()];
22
231 late StackTrace? _localStackTrace;
24 StackTrace? _remoteStackTrace;
25
261 @override
273 StackTrace? get stackTrace => _remoteStackTrace ?? _localStackTrace;
28
291 static SquadronError? deserialize(List data) {
30 SquadronError? error;
313 if (data[_$type] == _$typeMarker) {
323 error = SquadronError._(data[_$message]);
332 error._remoteStackTrace =
343 SquadronException.loadStackTrace(data[_$stackTrace]);
35 }
361 return error;
37 }
38
391 @override
403 String toString() => jsonEncode(serialize());
41}
42
433SquadronError newSquadronError(String message) => SquadronError._(message);
Choose Features