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

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

Issue 1214723009: Make List constructor give better error messages for non-int arguments (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Use unused variable. Created 5 years, 4 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
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/object_test.cc » ('j') | 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) 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 "platform/address_sanitizer.h" 7 #include "platform/address_sanitizer.h"
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 break; 591 break;
592 case kRangeRange: 592 case kRangeRange:
593 library = Library::CoreLibrary(); 593 library = Library::CoreLibrary();
594 class_name = &Symbols::RangeError(); 594 class_name = &Symbols::RangeError();
595 constructor_name = &Symbols::DotRange(); 595 constructor_name = &Symbols::DotRange();
596 break; 596 break;
597 case kArgument: 597 case kArgument:
598 library = Library::CoreLibrary(); 598 library = Library::CoreLibrary();
599 class_name = &Symbols::ArgumentError(); 599 class_name = &Symbols::ArgumentError();
600 break; 600 break;
601 case kArgumentValue:
602 library = Library::CoreLibrary();
603 class_name = &Symbols::ArgumentError();
604 constructor_name = &Symbols::DotValue();
605 break;
601 case kNoSuchMethod: 606 case kNoSuchMethod:
602 library = Library::CoreLibrary(); 607 library = Library::CoreLibrary();
603 class_name = &Symbols::NoSuchMethodError(); 608 class_name = &Symbols::NoSuchMethodError();
604 constructor_name = &Symbols::DotWithType(); 609 constructor_name = &Symbols::DotWithType();
605 break; 610 break;
606 case kFormat: 611 case kFormat:
607 library = Library::CoreLibrary(); 612 library = Library::CoreLibrary();
608 class_name = &Symbols::FormatException(); 613 class_name = &Symbols::FormatException();
609 break; 614 break;
610 case kUnsupported: 615 case kUnsupported:
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 675
671 // Throw JavascriptCompatibilityError exception. 676 // Throw JavascriptCompatibilityError exception.
672 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) { 677 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) {
673 const Array& exc_args = Array::Handle(Array::New(1)); 678 const Array& exc_args = Array::Handle(Array::New(1));
674 const String& msg_str = String::Handle(String::New(msg)); 679 const String& msg_str = String::Handle(String::New(msg));
675 exc_args.SetAt(0, msg_str); 680 exc_args.SetAt(0, msg_str);
676 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args); 681 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args);
677 } 682 }
678 683
679 } // namespace dart 684 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698