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

Side by Side Diff: runtime/vm/exceptions.cc

Issue 10989013: Change IllegalArgumentException to ArgumentError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated co19 test expectations. Created 8 years, 2 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
OLDNEW
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 4
5 #include "vm/exceptions.h" 5 #include "vm/exceptions.h"
6 6
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/debugger.h" 8 #include "vm/debugger.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 RawObject* Exceptions::Create( 379 RawObject* Exceptions::Create(
380 ExceptionType type, const GrowableArray<const Object*>& arguments) { 380 ExceptionType type, const GrowableArray<const Object*>& arguments) {
381 Library& library = Library::Handle(); 381 Library& library = Library::Handle();
382 String& class_name = String::Handle(); 382 String& class_name = String::Handle();
383 switch (type) { 383 switch (type) {
384 case kIndexOutOfRange: 384 case kIndexOutOfRange:
385 library = Library::CoreLibrary(); 385 library = Library::CoreLibrary();
386 class_name = Symbols::New("IndexOutOfRangeException"); 386 class_name = Symbols::New("IndexOutOfRangeException");
387 break; 387 break;
388 case kIllegalArgument: 388 case kArgument:
389 library = Library::CoreLibrary(); 389 library = Library::CoreLibrary();
390 class_name = Symbols::New("IllegalArgumentException"); 390 class_name = Symbols::New("ArgumentError");
391 break; 391 break;
392 case kNoSuchMethod: 392 case kNoSuchMethod:
393 library = Library::CoreLibrary(); 393 library = Library::CoreLibrary();
394 class_name = Symbols::New("NoSuchMethodError"); 394 class_name = Symbols::New("NoSuchMethodError");
395 break; 395 break;
396 case kClosureArgumentMismatch: 396 case kClosureArgumentMismatch:
397 library = Library::CoreLibrary(); 397 library = Library::CoreLibrary();
398 class_name = Symbols::New("ClosureArgumentMismatchException"); 398 class_name = Symbols::New("ClosureArgumentMismatchException");
399 break; 399 break;
400 case kObjectNotClosure: 400 case kObjectNotClosure:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 case kIsolateSpawn: 432 case kIsolateSpawn:
433 library = Library::IsolateLibrary(); 433 library = Library::IsolateLibrary();
434 class_name = Symbols::New("IsolateSpawnException"); 434 class_name = Symbols::New("IsolateSpawnException");
435 break; 435 break;
436 } 436 }
437 437
438 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); 438 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments);
439 } 439 }
440 440
441 } // namespace dart 441 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698