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

Side by Side Diff: lib/compiler/implementation/lib/mock.dart

Issue 10911143: Remove some exceptions from mock.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot file. Created 8 years, 3 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 | « no previous file | pkg/dartdoc/dartdoc.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Mocks of things that Leg cannot read directly. 5 // Mocks of things that Leg cannot read directly.
6 6
7 // TODO(ahe): Remove this file. 7 // TODO(ahe): Remove this file.
8 8
9 // TODO(ahe): VM specfic exception?
10 class InternalError {
11 const InternalError(this._msg);
12 String toString() => "InternalError: '${_msg}'";
13 final String _msg;
14 }
15
16 // TODO(ahe): VM specfic exception?
17 class StaticResolutionException implements Exception {}
18
19 void assert(condition) { 9 void assert(condition) {
20 if (condition is Function) condition = condition(); 10 if (condition is Function) condition = condition();
21 if (!condition) throw new AssertionError(); 11 if (!condition) throw new AssertionError();
22 } 12 }
23 13
24 // TODO(ahe): Not sure ByteArray belongs in the core library. 14 // TODO(ahe): Not sure ByteArray belongs in the core library.
25 interface Uint8List extends List default _InternalByteArray { 15 interface Uint8List extends List default _InternalByteArray {
26 Uint8List(int length); 16 Uint8List(int length);
27 } 17 }
28 18
29 class _InternalByteArray { 19 class _InternalByteArray {
30 factory Uint8List(int length) { 20 factory Uint8List(int length) {
31 throw new UnsupportedOperationException("new Uint8List($length)"); 21 throw new UnsupportedOperationException("new Uint8List($length)");
32 } 22 }
33 } 23 }
OLDNEW
« no previous file with comments | « no previous file | pkg/dartdoc/dartdoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698