LCOV - code coverage report
Current view: top level - lib/src/trie_router/src - errors.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 4 4 100.0 %
Date: 2021-04-04 17:06:32 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:path/path.dart' as path;
       2             : 
       3             : /// Indicates the user has configured their routes improperly.
       4             : class RouteConfigurationError extends Error {}
       5             : 
       6             : class ConflictingPathError extends RouteConfigurationError {
       7             :   final Iterable<String> segmentsToAdd;
       8             :   final Iterable<String?> segmentsAlreadyAdded;
       9             : 
      10           1 :   ConflictingPathError(this.segmentsToAdd, this.segmentsAlreadyAdded);
      11             : 
      12           1 :   @override
      13             :   String toString() {
      14           3 :     return "Attempt to add '${path.joinAll(segmentsToAdd)}' but a path containing "
      15           6 :         "'${path.joinAll(segmentsAlreadyAdded.where((element) => element != null).map((e) => e!))}' has already been added. Adding two paths "
      16             :         "prefixed with ':' at the same index is not allowed.";
      17             :   }
      18             : }

Generated by: LCOV version 1.15