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

Issue 389603002: Add extra information to FormatException. (Closed)

Created:
6 years, 5 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 5 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add extra information to FormatException. R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=38181

Patch Set 1 #

Total comments: 1

Patch Set 2 : Address comments. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -71 lines) Patch
M pkg/json_rpc_2/test/server/parameters_test.dart View 2 chunks +3 lines, -4 lines 0 comments Download
M runtime/lib/convert_patch.dart View 1 2 chunks +1 line, -12 lines 0 comments Download
M runtime/lib/double_patch.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/integers_patch.dart View 5 chunks +13 lines, -12 lines 0 comments Download
M sdk/lib/core/date_time.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/core/exceptions.dart View 1 1 chunk +111 lines, -2 lines 6 comments Download
M sdk/lib/core/uri.dart View 6 chunks +13 lines, -38 lines 0 comments Download
A tests/corelib/format_exception_test.dart View 1 1 chunk +73 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Lasse Reichstein Nielsen
This was something I had already done indirectly in two places, so it seemed like ...
6 years, 5 months ago (2014-07-11 12:17:06 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/389603002/diff/1/sdk/lib/core/exceptions.dart File sdk/lib/core/exceptions.dart (right): https://codereview.chromium.org/389603002/diff/1/sdk/lib/core/exceptions.dart#newcode66 sdk/lib/core/exceptions.dart:66: * Optionally also supply the source that had ...
6 years, 5 months ago (2014-07-11 16:03:27 UTC) #2
Lasse Reichstein Nielsen
Committed patchset #2 manually as r38181 (presubmit successful).
6 years, 5 months ago (2014-07-14 07:47:55 UTC) #3
nweiz
DBC https://codereview.chromium.org/389603002/diff/20001/sdk/lib/core/exceptions.dart File sdk/lib/core/exceptions.dart (right): https://codereview.chromium.org/389603002/diff/20001/sdk/lib/core/exceptions.dart#newcode48 sdk/lib/core/exceptions.dart:48: * The source that caused the error. The ...
6 years, 5 months ago (2014-07-14 19:33:50 UTC) #4
Lasse Reichstein Nielsen
https://codereview.chromium.org/389603002/diff/20001/sdk/lib/core/exceptions.dart File sdk/lib/core/exceptions.dart (right): https://codereview.chromium.org/389603002/diff/20001/sdk/lib/core/exceptions.dart#newcode48 sdk/lib/core/exceptions.dart:48: * The source that caused the error. I'll try ...
6 years, 5 months ago (2014-07-15 08:55:59 UTC) #5
nweiz
6 years, 5 months ago (2014-07-15 18:29:06 UTC) #6
Message was sent while issue was closed.
On 2014/07/15 08:55:59, Lasse Reichstein Nielsen wrote:
>
https://codereview.chromium.org/389603002/diff/20001/sdk/lib/core/exceptions....
> File sdk/lib/core/exceptions.dart (right):
> 
>
https://codereview.chromium.org/389603002/diff/20001/sdk/lib/core/exceptions....
> sdk/lib/core/exceptions.dart:48: * The source that caused the error.
> I'll try to make it more explicit, including the words "The actual source .."
> 
>
https://codereview.chromium.org/389603002/diff/20001/sdk/lib/core/exceptions....
> sdk/lib/core/exceptions.dart:55: final source;
> I don't want to mandate a type. It will almost always be a String, but you
> should also be able to use this exception when parsing a byte-buffer.
> 
> A FormatException should never be unexpected, so the receiver would know which
> input was given to the function throwing it. If that function is parsing byte
> lists, the source will be that byte list, and the caller can decide what to do
> with it.
> 
>
https://codereview.chromium.org/389603002/diff/20001/sdk/lib/core/exceptions....
> sdk/lib/core/exceptions.dart:57: * The position in source where the error was
> detected.
> I like "offset", so I changed it everywhere.
> Also tried to explain what it means (if source is a string, it's the index of
a
> code unit).

SGTM

Powered by Google App Engine
This is Rietveld 408576698