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

Issue 2407603002: Give useful message for null derefs (Closed)

Created:
4 years, 2 months ago by Hixie
Modified:
4 years, 2 months ago
Reviewers:
Cutch, rmacnak, sra1
CC:
reviews_dartlang.org, vm-dev_dartlang.org, floitsch
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Give useful message for null derefs The exception implements NoSuchMethodError so that code that depends on the previous exception type still works. BUG= R=johnmccutchan@google.com Committed: https://github.com/dart-lang/sdk/commit/588fed0368e5732c2cfe1929af7877d3018a2b2b

Patch Set 1 #

Total comments: 1

Patch Set 2 : Give useful message for null derefs #

Patch Set 3 : Also implement the patch for JS #

Patch Set 4 : Give useful message for null derefs #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -0 lines) Patch
M runtime/lib/null_patch.dart View 1 chunk +7 lines, -0 lines 1 comment Download
M sdk/lib/_internal/js_runtime/lib/core_patch.dart View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M sdk/lib/core/errors.dart View 1 2 3 1 chunk +18 lines, -0 lines 5 comments Download
M sdk/lib/core/null.dart View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
Cutch
https://codereview.chromium.org/2407603002/diff/1/sdk/lib/core/errors.dart File sdk/lib/core/errors.dart (right): https://codereview.chromium.org/2407603002/diff/1/sdk/lib/core/errors.dart#newcode130 sdk/lib/core/errors.dart:130: * The [message] optionally describes the circumstances under which ...
4 years, 2 months ago (2016-10-07 23:24:11 UTC) #2
Cutch
LGTM after fixing column lengths
4 years, 2 months ago (2016-10-07 23:25:44 UTC) #3
Cutch
Committed patchset #4 (id:60001) manually as 588fed0368e5732c2cfe1929af7877d3018a2b2b (presubmit successful).
4 years, 2 months ago (2016-10-10 19:53:54 UTC) #6
sra1
This CL can't work for dart2js because of the constraints of generating efficient JavaScript. It ...
4 years, 2 months ago (2016-10-10 21:19:33 UTC) #8
sra1
This CL can't work for dart2js because of the constraints of generating efficient JavaScript. It ...
4 years, 2 months ago (2016-10-10 21:19:37 UTC) #9
rmacnak
https://codereview.chromium.org/2407603002/diff/60001/runtime/lib/null_patch.dart File runtime/lib/null_patch.dart (right): https://codereview.chromium.org/2407603002/diff/60001/runtime/lib/null_patch.dart#newcode20 runtime/lib/null_patch.dart:20: throw new NullDereferenceError('$name() was called on a null value.'); ...
4 years, 2 months ago (2016-10-10 21:29:39 UTC) #11
sra1
https://codereview.chromium.org/2407603002/diff/60001/sdk/lib/core/errors.dart File sdk/lib/core/errors.dart (right): https://codereview.chromium.org/2407603002/diff/60001/sdk/lib/core/errors.dart#newcode125 sdk/lib/core/errors.dart:125: class NullDereferenceError extends Error implements NoSuchMethodError { This class ...
4 years, 2 months ago (2016-10-10 21:50:40 UTC) #12
Hixie
Thanks for all the comments, I shall attempt this again with a different approach! My ...
4 years, 2 months ago (2016-10-10 21:57:38 UTC) #13
Hixie
4 years, 2 months ago (2016-10-11 20:37:02 UTC) #14
Message was sent while issue was closed.
Ok, second attempt is here: https://codereview.chromium.org/2405353002/

Powered by Google App Engine
This is Rietveld 408576698