Chromium Code Reviews| 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 // 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 20 matching lines...) Expand all Loading... | |
| 31 String dst_type_name, | 31 String dst_type_name, |
| 32 String dst_name, | 32 String dst_name, |
| 33 String malformed_error) | 33 String malformed_error) |
| 34 native "TypeError_throwNew"; | 34 native "TypeError_throwNew"; |
| 35 String toString() { | 35 String toString() { |
| 36 String str = (malformedError != null) ? malformedError : ""; | 36 String str = (malformedError != null) ? malformedError : ""; |
| 37 if ((dstName != null) && (dstName.length > 0)) { | 37 if ((dstName != null) && (dstName.length > 0)) { |
| 38 str = str + | 38 str = str + |
| 39 "type '$srcType' is not assignable to type '$dstType' of '$dstName'."; | 39 "type '$srcType' is not assignable to type '$dstType' of '$dstName'."; |
| 40 } else { | 40 } else { |
| 41 str = str + "malformed type used in type test."; | 41 str = str + "malformed type used."; |
|
srdjan
2012/03/09 20:48:28
While you are here: remove String + operator.
regis
2012/03/09 21:08:37
Done.
| |
| 42 } | 42 } |
| 43 return str; | 43 return str; |
| 44 } | 44 } |
| 45 final String srcType; | 45 final String srcType; |
| 46 final String dstType; | 46 final String dstType; |
| 47 final String dstName; | 47 final String dstName; |
| 48 final String malformedError; | 48 final String malformedError; |
| 49 } | 49 } |
| 50 | 50 |
| 51 class FallThroughError { | 51 class FallThroughError { |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 77 String toString() => "Unresolved static method: url '$url' line $line " + | 77 String toString() => "Unresolved static method: url '$url' line $line " + |
| 78 "pos $column\n$failedResolutionLine\n"; | 78 "pos $column\n$failedResolutionLine\n"; |
| 79 | 79 |
| 80 static _throwNew(int token_pos) native "StaticResolutionException_throwNew"; | 80 static _throwNew(int token_pos) native "StaticResolutionException_throwNew"; |
| 81 | 81 |
| 82 final String failedResolutionLine; | 82 final String failedResolutionLine; |
| 83 final String url; | 83 final String url; |
| 84 final int line; | 84 final int line; |
| 85 final int column; | 85 final int column; |
| 86 } | 86 } |
| OLD | NEW |