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 | 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 class_name = Symbols::New("NoSuchMethodException"); | 380 class_name = Symbols::New("NoSuchMethodException"); |
381 break; | 381 break; |
382 case kClosureArgumentMismatch: | 382 case kClosureArgumentMismatch: |
383 library = Library::CoreLibrary(); | 383 library = Library::CoreLibrary(); |
384 class_name = Symbols::New("ClosureArgumentMismatchException"); | 384 class_name = Symbols::New("ClosureArgumentMismatchException"); |
385 break; | 385 break; |
386 case kObjectNotClosure: | 386 case kObjectNotClosure: |
387 library = Library::CoreLibrary(); | 387 library = Library::CoreLibrary(); |
388 class_name = Symbols::New("ObjectNotClosureException"); | 388 class_name = Symbols::New("ObjectNotClosureException"); |
389 break; | 389 break; |
390 case kBadNumberFormat: | 390 case kFormat: |
391 library = Library::CoreLibrary(); | 391 library = Library::CoreLibrary(); |
392 class_name = Symbols::New("BadNumberFormatException"); | 392 class_name = Symbols::New("FormatException"); |
393 break; | 393 break; |
394 case kStackOverflow: | 394 case kStackOverflow: |
395 library = Library::CoreLibrary(); | 395 library = Library::CoreLibrary(); |
396 class_name = Symbols::New("StackOverflowException"); | 396 class_name = Symbols::New("StackOverflowException"); |
397 break; | 397 break; |
398 case kOutOfMemory: | 398 case kOutOfMemory: |
399 library = Library::CoreLibrary(); | 399 library = Library::CoreLibrary(); |
400 class_name = Symbols::New("OutOfMemoryException"); | 400 class_name = Symbols::New("OutOfMemoryException"); |
401 break; | 401 break; |
402 case kWrongArgumentCount: | 402 case kWrongArgumentCount: |
(...skipping 15 matching lines...) Expand all Loading... |
418 case kIsolateSpawn: | 418 case kIsolateSpawn: |
419 library = Library::IsolateLibrary(); | 419 library = Library::IsolateLibrary(); |
420 class_name = Symbols::New("IsolateSpawnException"); | 420 class_name = Symbols::New("IsolateSpawnException"); |
421 break; | 421 break; |
422 } | 422 } |
423 | 423 |
424 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); | 424 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); |
425 } | 425 } |
426 | 426 |
427 } // namespace dart | 427 } // namespace dart |
OLD | NEW |