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

Issue 10983066: Minor improvement to File diagnostics (Closed)

Created:
8 years, 2 months ago by ahe
Modified:
8 years, 2 months ago
CC:
reviews_dartlang.org, gram
Visibility:
Public.

Description

Minor improvement to File diagnostics Committed: https://code.google.com/p/dart/source/detail?r=13005

Patch Set 1 #

Total comments: 5

Patch Set 2 : Added a test #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -1 line) Patch
M dart/runtime/bin/file_impl.dart View 1 chunk +6 lines, -1 line 0 comments Download
A dart/tests/standalone/io/file_constructor_test.dart View 1 1 chunk +26 lines, -0 lines 3 comments Download

Messages

Total messages: 14 (0 generated)
ahe
8 years, 2 months ago (2012-09-27 16:22:44 UTC) #1
Mads Ager (google)
LGTM, thanks Peter!
8 years, 2 months ago (2012-09-27 16:38:32 UTC) #2
ahe
On 2012/09/27 16:38:32, Mads Ager wrote: > LGTM, thanks Peter! I'll create a test case ...
8 years, 2 months ago (2012-09-27 16:49:48 UTC) #3
Mads Ager (google)
On 2012/09/27 16:49:48, ahe wrote: > On 2012/09/27 16:38:32, Mads Ager wrote: > > LGTM, ...
8 years, 2 months ago (2012-09-27 17:05:02 UTC) #4
gram
lgtm Excellent! Thanks Peter.
8 years, 2 months ago (2012-09-27 17:06:50 UTC) #5
ahe
On 2012/09/27 17:05:02, Mads Ager wrote: > Sounds good, thanks. Also, for other exceptions we ...
8 years, 2 months ago (2012-09-28 09:15:11 UTC) #6
Mads Ager (google)
LGTM! Thanks for adding the test and I was wrong about the consistency of using ...
8 years, 2 months ago (2012-09-28 09:48:56 UTC) #7
ahe
http://codereview.chromium.org/10983066/diff/2002/dart/tests/standalone/io/file_constructor_test.dart File dart/tests/standalone/io/file_constructor_test.dart (right): http://codereview.chromium.org/10983066/diff/2002/dart/tests/standalone/io/file_constructor_test.dart#newcode10 dart/tests/standalone/io/file_constructor_test.dart:10: new File('blåbærgrød'); On 2012/09/28 09:48:56, Mads Ager wrote: > ...
8 years, 2 months ago (2012-09-28 10:42:57 UTC) #8
Mads Ager (google)
http://codereview.chromium.org/10983066/diff/2002/dart/tests/standalone/io/file_constructor_test.dart File dart/tests/standalone/io/file_constructor_test.dart (right): http://codereview.chromium.org/10983066/diff/2002/dart/tests/standalone/io/file_constructor_test.dart#newcode10 dart/tests/standalone/io/file_constructor_test.dart:10: new File('blåbærgrød'); On 2012/09/28 10:42:57, ahe wrote: > On ...
8 years, 2 months ago (2012-09-28 11:05:42 UTC) #9
Ivan Posva
https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_impl.dart File dart/runtime/bin/file_impl.dart (right): https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_impl.dart#newcode498 dart/runtime/bin/file_impl.dart:498: throw new ArgumentError('${NoSuchMethodError.safeToString(_name)} ' Peter can you explain why ...
8 years, 2 months ago (2012-10-02 00:19:38 UTC) #10
ahe
https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_impl.dart File dart/runtime/bin/file_impl.dart (right): https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_impl.dart#newcode498 dart/runtime/bin/file_impl.dart:498: throw new ArgumentError('${NoSuchMethodError.safeToString(_name)} ' On 2012/10/02 00:19:38, Ivan Posva ...
8 years, 2 months ago (2012-10-02 04:49:23 UTC) #11
Ivan Posva
https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_impl.dart File dart/runtime/bin/file_impl.dart (right): https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_impl.dart#newcode498 dart/runtime/bin/file_impl.dart:498: throw new ArgumentError('${NoSuchMethodError.safeToString(_name)} ' On 2012/10/02 04:49:24, ahe wrote: ...
8 years, 2 months ago (2012-10-02 05:19:11 UTC) #12
ahe
https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_impl.dart File dart/runtime/bin/file_impl.dart (right): https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_impl.dart#newcode498 dart/runtime/bin/file_impl.dart:498: throw new ArgumentError('${NoSuchMethodError.safeToString(_name)} ' On 2012/10/02 05:19:11, Ivan Posva ...
8 years, 2 months ago (2012-10-02 05:39:46 UTC) #13
ahe
8 years, 2 months ago (2012-10-02 07:47:11 UTC) #14
https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_...
File dart/runtime/bin/file_impl.dart (right):

https://chromiumcodereview.appspot.com/10983066/diff/1/dart/runtime/bin/file_...
dart/runtime/bin/file_impl.dart:498: throw new
ArgumentError('${NoSuchMethodError.safeToString(_name)} '
On 2012/10/02 05:39:47, ahe wrote:
> On 2012/10/02 05:19:11, Ivan Posva wrote:
> > On 2012/10/02 04:49:24, ahe wrote:
> > > On 2012/10/02 00:19:38, Ivan Posva wrote:
> > > > Peter can you explain why you are using NoSuchMethodError.safeToString
> here?
> > I
> > > > understand how it can make sense in NoSuchMethodError handling, but here
> not
> > > so.
> > > 
> > > It makes sense to use safeToString here because the error is about the
type
> of
> > > the object. Generally, calling toString during error reporting is
> undesirable
> > > for the same reasons as in NoSuchMethodError. 
> > 
> > It just feels very strange to be calling some random static method of some
> > exception here.
> 
> Agreed, I would like to find a better place for the static method, and perhaps
> make it more convenient to use. I'll file a bug. 

Filed http://dartbug.com/5596.

Powered by Google App Engine
This is Rietveld 408576698