| OLD | NEW | 
 | (Empty) | 
|   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 |  | 
|   3 // BSD-style license that can be found in the LICENSE file. |  | 
|   4  |  | 
|   5 // Mocks of things that Leg cannot read directly. |  | 
|   6  |  | 
|   7 // TODO(ahe): Remove this file. |  | 
|   8  |  | 
|   9 class AssertionError {} |  | 
|  10 class TypeError extends AssertionError {} |  | 
|  11  |  | 
|  12 class FallThroughError { |  | 
|  13   const FallThroughError(); |  | 
|  14   String toString() => "Switch case fall-through."; |  | 
|  15 } |  | 
|  16  |  | 
|  17 // TODO(ahe): VM specfic exception? |  | 
|  18 class InternalError { |  | 
|  19   const InternalError(this._msg); |  | 
|  20   String toString() => "InternalError: '${_msg}'"; |  | 
|  21   final String _msg; |  | 
|  22 } |  | 
|  23  |  | 
|  24 // TODO(ahe): VM specfic exception? |  | 
|  25 class StaticResolutionException implements Exception {} |  | 
|  26  |  | 
|  27 void assert(condition) {} |  | 
|  28  |  | 
|  29 // TODO(ahe): Not sure ByteArray belongs in the core library. |  | 
|  30 interface ByteArray extends List default _InternalByteArray { |  | 
|  31   ByteArray(int length); |  | 
|  32 } |  | 
|  33  |  | 
|  34 class _InternalByteArray { |  | 
|  35   factory _InternalByteArray(int length) { |  | 
|  36     throw new UnsupportedOperationException("new ByteArray($length)"); |  | 
|  37   } |  | 
|  38 } |  | 
|  39  |  | 
|  40 // TODO(ahe): This definitely does not belong in the core library. |  | 
|  41 void exit(int exitCode) { |  | 
|  42   throw new UnsupportedOperationException("exit($exitCode)"); |  | 
|  43 } |  | 
| OLD | NEW |