OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Errors are created and thrown by DartVM only. | 4 // Errors are created and thrown by DartVM only. |
5 // Changes here should also be reflected in corelib/error.dart as well | 5 // Changes here should also be reflected in corelib/error.dart as well |
6 | 6 |
7 class AssertionError { | 7 class AssertionError { |
8 factory AssertionError._uninstantiable() { | 8 factory AssertionError._uninstantiable() { |
9 throw const UnsupportedOperationException( | 9 throw const UnsupportedOperationException( |
10 "AssertionError can only be allocated by the VM"); | 10 "AssertionError can only be allocated by the VM"); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 final String url; | 52 final String url; |
53 final int line; | 53 final int line; |
54 } | 54 } |
55 | 55 |
56 class InternalError { | 56 class InternalError { |
57 const InternalError(this._msg); | 57 const InternalError(this._msg); |
58 String toString() => "InternalError: '${_msg}'"; | 58 String toString() => "InternalError: '${_msg}'"; |
59 final String _msg; | 59 final String _msg; |
60 } | 60 } |
| 61 |
| 62 |
| 63 class StaticResolutionException implements Exception { |
| 64 factory StaticResolutionException._uninstantiable() { |
| 65 throw const UnsupportedOperationException( |
| 66 "StaticResolutionException can only be allocated by the VM"); |
| 67 } |
| 68 |
| 69 String toString() => "Unresolved static method: url '$url' line $line " + |
| 70 "pos $column\n$failedResolutionLine\n"; |
| 71 |
| 72 static _throwNew(int token_pos) native "StaticResolutionException_throwNew"; |
| 73 |
| 74 final String failedResolutionLine; |
| 75 final String url; |
| 76 final int line; |
| 77 final int column; |
| 78 } |
OLD | NEW |