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

Side by Side Diff: packages/smoke/lib/static.dart

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « packages/smoke/lib/mirrors.dart ('k') | packages/smoke/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Static implementation of smoke services using code-generated data. 5 /// Static implementation of smoke services using code-generated data.
6 library smoke.static; 6 library smoke.static;
7 7
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:smoke/smoke.dart'; 10 import 'package:smoke/smoke.dart';
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 var max = maxArgs(method); 138 var max = maxArgs(method);
139 args = adjustList(args, min, max >= 0 ? max : args.length); 139 args = adjustList(args, min, max >= 0 ? max : args.length);
140 } 140 }
141 } 141 }
142 if (namedArgs != null) { 142 if (namedArgs != null) {
143 throw new UnsupportedError( 143 throw new UnsupportedError(
144 'smoke.static doesn\'t support namedArguments in invoke'); 144 'smoke.static doesn\'t support namedArguments in invoke');
145 } 145 }
146 try { 146 try {
147 return Function.apply(method, args); 147 return Function.apply(method, args);
148 } on NoSuchMethodError catch (e) { 148 } on NoSuchMethodError catch (_) {
149 // TODO(sigmund): consider whether this should just be in a logger or if 149 // TODO(sigmund): consider whether this should just be in a logger or if
150 // we should wrap `e` as a new exception (what's the best way to let users 150 // we should wrap `e` as a new exception (what's the best way to let users
151 // know about this tentativeError?) 151 // know about this tentativeError?)
152 if (tentativeError != null) print(tentativeError); 152 if (tentativeError != null) print(tentativeError);
153 rethrow; 153 rethrow;
154 } 154 }
155 } 155 }
156 } 156 }
157 157
158 /// Implements [TypeInspectorService] using a static configuration. 158 /// Implements [TypeInspectorService] using a static configuration.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 /// Exception thrown when trynig to access something that should be there, but 284 /// Exception thrown when trynig to access something that should be there, but
285 /// the code generator didn't include it. 285 /// the code generator didn't include it.
286 class MissingCodeException implements Exception { 286 class MissingCodeException implements Exception {
287 final String description; 287 final String description;
288 MissingCodeException(this.description); 288 MissingCodeException(this.description);
289 289
290 String toString() => 'Missing $description. ' 290 String toString() => 'Missing $description. '
291 'Code generation for the smoke package seems incomplete.'; 291 'Code generation for the smoke package seems incomplete.';
292 } 292 }
OLDNEW
« no previous file with comments | « packages/smoke/lib/mirrors.dart ('k') | packages/smoke/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698