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

Issue 9559001: Fix Issue 1846: Improve error reporting in presence of imports. With this CL: (Closed)

Created:
8 years, 9 months ago by srdjan
Modified:
8 years, 9 months ago
Reviewers:
turnidge, hausner
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix Issue 1846: Improve error reporting in presence of imports. With this CL: '/Users/srdjan/bdartall/dart/runtime/bug3.dart': Error: line 2 pos 1: unexpected token 'abstract' abstract class A { } ^ '/Users/srdjan/bdartall/dart/runtime/bug2.dart': Error: line 2 pos 1: library handler failed #import("bug3.dart"); ^ '/Users/srdjan/bdartall/dart/runtime/bug1.dart': Error: line 2 pos 1: library handler failed #import("bug2.dart"); ^ Committed: https://code.google.com/p/dart/source/detail?r=4773

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -1 line) Patch
M runtime/vm/parser.h View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 chunks +32 lines, -1 line 3 comments Download

Messages

Total messages: 6 (0 generated)
srdjan
8 years, 9 months ago (2012-02-29 22:03:55 UTC) #1
hausner
LokTM but it hurts a little. Feel free to ignore comment if you don't feel ...
8 years, 9 months ago (2012-02-29 22:56:02 UTC) #2
srdjan
https://chromiumcodereview.appspot.com/9559001/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://chromiumcodereview.appspot.com/9559001/diff/1/runtime/vm/parser.cc#newcode3314 runtime/vm/parser.cc:3314: Dart_GetError(result), token_pos, "library handler failed"); On 2012/02/29 22:56:02, hausner ...
8 years, 9 months ago (2012-02-29 23:47:04 UTC) #3
hausner
Post-mortem comment. https://chromiumcodereview.appspot.com/9559001/diff/2002/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://chromiumcodereview.appspot.com/9559001/diff/2002/runtime/vm/parser.cc#newcode5270 runtime/vm/parser.cc:5270: const String& msg1 = String::Handle(String::New(prev_error.ToErrorCString())); Why not ...
8 years, 9 months ago (2012-03-01 00:10:16 UTC) #4
srdjan
https://chromiumcodereview.appspot.com/9559001/diff/2002/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://chromiumcodereview.appspot.com/9559001/diff/2002/runtime/vm/parser.cc#newcode5270 runtime/vm/parser.cc:5270: const String& msg1 = String::Handle(String::New(prev_error.ToErrorCString())); On 2012/03/01 00:10:16, hausner ...
8 years, 9 months ago (2012-03-01 00:17:34 UTC) #5
turnidge
8 years, 9 months ago (2012-03-07 00:41:20 UTC) #6
https://chromiumcodereview.appspot.com/9559001/diff/2002/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

https://chromiumcodereview.appspot.com/9559001/diff/2002/runtime/vm/parser.cc...
runtime/vm/parser.cc:5270: const String& msg1 =
String::Handle(String::New(prev_error.ToErrorCString()));
On 2012/03/01 00:17:34, srdjan wrote:
> On 2012/03/01 00:10:16, hausner wrote:
> > Why not use prev_error.message()? There is still a detour through C land in
> your
> > version.
> 
> There is no Error::message(). Some subclasses implement it, some don't. All
> implement ToErrorCString, although some have UNREACHABLE in them.

You should be able to use ToErrorCString on any real Error object.  Nobody is
using UnwindErrors yet, so the UNIMPLEMENTED there doesn't matter.  All other
subclasses of Error have reasonable implementations.

Powered by Google App Engine
This is Rietveld 408576698