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

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

Issue 1294483003: Revert "Make List constructor give better error messages for non-int arguments" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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/symbols.h » ('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;
606 case kNoSuchMethod: 601 case kNoSuchMethod:
607 library = Library::CoreLibrary(); 602 library = Library::CoreLibrary();
608 class_name = &Symbols::NoSuchMethodError(); 603 class_name = &Symbols::NoSuchMethodError();
609 constructor_name = &Symbols::DotWithType(); 604 constructor_name = &Symbols::DotWithType();
610 break; 605 break;
611 case kFormat: 606 case kFormat:
612 library = Library::CoreLibrary(); 607 library = Library::CoreLibrary();
613 class_name = &Symbols::FormatException(); 608 class_name = &Symbols::FormatException();
614 break; 609 break;
615 case kUnsupported: 610 case kUnsupported:
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 670
676 // Throw JavascriptCompatibilityError exception. 671 // Throw JavascriptCompatibilityError exception.
677 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) { 672 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) {
678 const Array& exc_args = Array::Handle(Array::New(1)); 673 const Array& exc_args = Array::Handle(Array::New(1));
679 const String& msg_str = String::Handle(String::New(msg)); 674 const String& msg_str = String::Handle(String::New(msg));
680 exc_args.SetAt(0, msg_str); 675 exc_args.SetAt(0, msg_str);
681 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args); 676 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args);
682 } 677 }
683 678
684 } // namespace dart 679 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698