Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: third_party/pkg/di/lib/src/error_helper.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/pkg/di/lib/src/base_injector.dart ('k') | third_party/pkg/di/lib/src/errors.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 library di.error_helper;
2
3 import 'package:di/di.dart';
4 import 'package:di/src/base_injector.dart';
5
6 String error(ResolutionContext resolving, message, [Key appendDependency]) {
7 if (appendDependency != null) {
8 resolving = new ResolutionContext(resolving.depth + 1, appendDependency, res olving);
9 }
10
11 String graph = resolvedTypes(resolving).reversed.join(' -> ');
12
13 return '$message (resolving $graph)';
14 }
15
16 List<Key> resolvedTypes(ResolutionContext resolving) {
17 List resolved = [];
18 while (resolving.depth != 0) {
19 resolved.add(resolving.key);
20 resolving = resolving.parent;
21 }
22 return resolved;
23 }
OLDNEW
« no previous file with comments | « third_party/pkg/di/lib/src/base_injector.dart ('k') | third_party/pkg/di/lib/src/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698