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

Unified Diff: runtime/lib/regexp_jsc.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 | « runtime/lib/regexp.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/regexp_jsc.cc
diff --git a/runtime/lib/regexp_jsc.cc b/runtime/lib/regexp_jsc.cc
index cb3ec6819424c47ae03f4d97955627dfe8768b9a..158579f99d2ee91abf4fdcdc8a24dd6eda1d8485 100644
--- a/runtime/lib/regexp_jsc.cc
+++ b/runtime/lib/regexp_jsc.cc
@@ -41,13 +41,13 @@ static void JSREFree(void* ptr) {
static void ThrowExceptionOnError(const String& pattern,
const char* error_msg) {
if (error_msg == NULL) {
- error_msg = "Unknown regexp compile error";
+ error_msg = "Unknown regexp compile error. ";
}
const String& errmsg = String::Handle(String::New(error_msg));
- const Array& args = Array::Handle(Array::New(2));
- args.SetAt(0, pattern);
- args.SetAt(1, errmsg);
- Exceptions::ThrowByType(Exceptions::kIllegalJSRegExp, args);
+ 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);
}
« no previous file with comments | « runtime/lib/regexp.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698