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

Side by Side Diff: sdk/lib/core/errors.dart

Issue 2563633002: Make the VM's dart:core and dart:async library patches clean. (Closed)
Patch Set: Make moveNextFn private. Created 4 years 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
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 4
5 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * Error objects thrown in the case of a program failure. 8 * Error objects thrown in the case of a program failure.
9 * 9 *
10 * An `Error` object represents a program failure that the programmer 10 * An `Error` object represents a program failure that the programmer
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 /** 407 /**
408 * Error thrown when control reaches the end of a switch case. 408 * Error thrown when control reaches the end of a switch case.
409 * 409 *
410 * The Dart specification requires this error to be thrown when 410 * The Dart specification requires this error to be thrown when
411 * control reaches the end of a switch case (except the last case 411 * control reaches the end of a switch case (except the last case
412 * of a switch) without meeting a break or similar end of the control 412 * of a switch) without meeting a break or similar end of the control
413 * flow. 413 * flow.
414 */ 414 */
415 class FallThroughError extends Error { 415 class FallThroughError extends Error {
416 FallThroughError(); 416 FallThroughError();
417
418 external String toString();
417 } 419 }
418 420
419 /** 421 /**
420 * Error thrown when trying to instantiate an abstract class. 422 * Error thrown when trying to instantiate an abstract class.
421 */ 423 */
422 class AbstractClassInstantiationError extends Error { 424 class AbstractClassInstantiationError extends Error {
423 final String _className; 425 final String _className;
424 AbstractClassInstantiationError(String this._className); 426 AbstractClassInstantiationError(String className) : _className = className;
425 String toString() => "Cannot instantiate abstract class: '$_className'"; 427
428 external String toString();
426 } 429 }
427 430
428 431
429 /** 432 /**
430 * Error thrown by the default implementation of [:noSuchMethod:] on [Object]. 433 * Error thrown by the default implementation of [:noSuchMethod:] on [Object].
431 */ 434 */
432 class NoSuchMethodError extends Error { 435 class NoSuchMethodError extends Error {
433 final Object _receiver; 436 final Object _receiver;
434 final Symbol _memberName; 437 final Symbol _memberName;
435 final List _arguments; 438 final List _arguments;
(...skipping 16 matching lines...) Expand all
452 * empty list. 455 * empty list.
453 * 456 *
454 * The [namedArguments] is a map from [Symbol]s to the values of named 457 * The [namedArguments] is a map from [Symbol]s to the values of named
455 * arguments that the method was called with. 458 * arguments that the method was called with.
456 * 459 *
457 * The optional [existingArgumentNames] is the expected parameters of a 460 * The optional [existingArgumentNames] is the expected parameters of a
458 * method with the same name on the receiver, if available. This is 461 * method with the same name on the receiver, if available. This is
459 * the signature of the method that would have been called if the parameters 462 * the signature of the method that would have been called if the parameters
460 * had matched. 463 * had matched.
461 */ 464 */
462 NoSuchMethodError(Object receiver, 465 external NoSuchMethodError(Object receiver,
463 Symbol memberName, 466 Symbol memberName,
464 List positionalArguments, 467 List positionalArguments,
465 Map<Symbol ,dynamic> namedArguments, 468 Map<Symbol, dynamic> namedArguments,
466 [List existingArgumentNames = null]) 469 [List existingArgumentNames = null]);
467 : _receiver = receiver,
468 _memberName = memberName,
469 _arguments = positionalArguments,
470 _namedArguments = namedArguments,
471 _existingArgumentNames = existingArgumentNames;
472 470
473 external String toString(); 471 external String toString();
474 } 472 }
475 473
476 474
477 /** 475 /**
478 * The operation was not allowed by the object. 476 * The operation was not allowed by the object.
479 * 477 *
480 * This [Error] is thrown when an instance cannot implement one of the methods 478 * This [Error] is thrown when an instance cannot implement one of the methods
481 * in its signature. 479 * in its signature.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 * the first time it is read. If evaluating the initializer expression causes 562 * the first time it is read. If evaluating the initializer expression causes
565 * another read of the variable, this error is thrown. 563 * another read of the variable, this error is thrown.
566 */ 564 */
567 class CyclicInitializationError extends Error { 565 class CyclicInitializationError extends Error {
568 final String variableName; 566 final String variableName;
569 CyclicInitializationError([this.variableName]); 567 CyclicInitializationError([this.variableName]);
570 String toString() => variableName == null 568 String toString() => variableName == null
571 ? "Reading static variable during its initialization" 569 ? "Reading static variable during its initialization"
572 : "Reading static variable '$variableName' during its initialization"; 570 : "Reading static variable '$variableName' during its initialization";
573 } 571 }
OLDNEW
« no previous file with comments | « sdk/lib/core/bool.dart ('k') | sdk/lib/core/null.dart » ('j') | sdk/lib/internal/internal.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698