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

Unified Diff: runtime/lib/regexp.cc

Issue 12317130: Remove deprecated IllegalJSRegExpException class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/unittest/test/matchers_test.dart ('k') | runtime/lib/regexp_jsc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/regexp.cc
diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc
index 674ab645b54c6e372fa988209e55e0c64150275d..34166983f651bd3e75a86ca3985d002faf61715e 100644
--- a/runtime/lib/regexp.cc
+++ b/runtime/lib/regexp.cc
@@ -54,12 +54,12 @@ DEFINE_NATIVE_ENTRY(JSSyntaxRegExp_getGroupCount, 1) {
return regexp.num_bracket_expressions();
}
const String& pattern = String::Handle(regexp.pattern());
- const String& errmsg =
- String::Handle(String::New("Regular expression is not initialized yet"));
- const Array& args = Array::Handle(Array::New(2));
- args.SetAt(0, pattern);
- args.SetAt(1, errmsg);
- Exceptions::ThrowByType(Exceptions::kIllegalJSRegExp, args);
+ const String& errmsg = String::Handle(
+ String::New("Regular expression is not initialized yet. "));
+ const String& message = String::Handle(String::Concat(errmsg, pattern));
+ const Array& args = Array::Handle(Array::New(1));
+ args.SetAt(0, message);
+ Exceptions::ThrowByType(Exceptions::kFormat, args);
return Object::null();
}
« no previous file with comments | « pkg/unittest/test/matchers_test.dart ('k') | runtime/lib/regexp_jsc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698