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

Side by Side Diff: runtime/lib/error.dart

Issue 9730009: - Fix use of String operator + in core libraries. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « corelib/src/future.dart ('k') | no next file » | 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 // 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");
11 } 11 }
12 static _throwNew(int assertionStart, int assertionEnd) 12 static _throwNew(int assertionStart, int assertionEnd)
13 native "AssertionError_throwNew"; 13 native "AssertionError_throwNew";
14 String toString() { 14 String toString() {
15 return "'$url': Failed assertion: line $line pos $column: " + 15 return "'$url': Failed assertion: line $line pos $column: "
16 "'$failedAssertion' is not true."; 16 "'$failedAssertion' is not true.";
17 } 17 }
18 final String failedAssertion; 18 final String failedAssertion;
19 final String url; 19 final String url;
20 final int line; 20 final int line;
21 final int column; 21 final int column;
22 } 22 }
23 23
24 class TypeError extends AssertionError { 24 class TypeError extends AssertionError {
25 factory TypeError._uninstantiable() { 25 factory TypeError._uninstantiable() {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 final String _msg; 67 final String _msg;
68 } 68 }
69 69
70 70
71 class StaticResolutionException implements Exception { 71 class StaticResolutionException implements Exception {
72 factory StaticResolutionException._uninstantiable() { 72 factory StaticResolutionException._uninstantiable() {
73 throw const UnsupportedOperationException( 73 throw const UnsupportedOperationException(
74 "StaticResolutionException can only be allocated by the VM"); 74 "StaticResolutionException can only be allocated by the VM");
75 } 75 }
76 76
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 }
OLDNEW
« no previous file with comments | « corelib/src/future.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698