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

Unified Diff: runtime/bin/dartutils.cc

Issue 118123006: Better error reporting when passing a non-UTF8 file as script: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 12 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 | « no previous file | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
===================================================================
--- runtime/bin/dartutils.cc (revision 31420)
+++ runtime/bin/dartutils.cc (working copy)
@@ -629,7 +629,7 @@
} else {
Dart_Handle source = Dart_NewStringFromUTF8(buffer, len);
if (Dart_IsError(source)) {
- returnValue = source;
+ returnValue = NewError("%s is not a valid UTF-8 script", script_uri);
} else {
returnValue = Dart_LoadScript(resolved_script_uri, source, 0, 0);
}
« no previous file with comments | « no previous file | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698