| OLD | NEW |
| 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 class AssertionError {} | 9 class AssertionError {} |
| 10 class TypeError extends AssertionError {} | 10 class TypeError extends AssertionError { |
| 11 final String msg; |
| 12 const TypeError(String this.msg); |
| 13 String toString() => msg; |
| 14 } |
| 11 | 15 |
| 12 class FallThroughError { | 16 class FallThroughError { |
| 13 const FallThroughError(); | 17 const FallThroughError(); |
| 14 String toString() => "Switch case fall-through."; | 18 String toString() => "Switch case fall-through."; |
| 15 } | 19 } |
| 16 | 20 |
| 17 // TODO(ahe): VM specfic exception? | 21 // TODO(ahe): VM specfic exception? |
| 18 class InternalError { | 22 class InternalError { |
| 19 const InternalError(this._msg); | 23 const InternalError(this._msg); |
| 20 String toString() => "InternalError: '${_msg}'"; | 24 String toString() => "InternalError: '${_msg}'"; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 34 class _InternalByteArray { | 38 class _InternalByteArray { |
| 35 factory Uint8List(int length) { | 39 factory Uint8List(int length) { |
| 36 throw new UnsupportedOperationException("new Uint8List($length)"); | 40 throw new UnsupportedOperationException("new Uint8List($length)"); |
| 37 } | 41 } |
| 38 } | 42 } |
| 39 | 43 |
| 40 // TODO(ahe): This definitely does not belong in the core library. | 44 // TODO(ahe): This definitely does not belong in the core library. |
| 41 void exit(int exitCode) { | 45 void exit(int exitCode) { |
| 42 throw new UnsupportedOperationException("exit($exitCode)"); | 46 throw new UnsupportedOperationException("exit($exitCode)"); |
| 43 } | 47 } |
| OLD | NEW |