[Issue 11841] New: More useful RangeError message
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 29 07:12:10 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11841
Summary: More useful RangeError message
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-12-29 07:12:09 PST ---
Wrong code:
void main() {
int[10] data;
int i = 20;
int j = 30;
data[i .. j] = 0;
}
DMD 2.065alpha outputs:
core.exception.RangeError at temp(5): Range violation
But I'd like an error message like this:
core.exception.RangeError at temp(5): Range violation (20..30 is out of 0..10)
(Optional: if you want in -release -noboundscheck mode the first message
without the bounds is enough, to keep the binary more light.)
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list