Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #826 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Gregorian dies due to ArrayBoundsException when given a month outside the range [1..12]

Reported by: Deewiant Assigned to: schveiguy
Priority: major Milestone: 0.99.5
Component: Core Functionality Version: trunk
Keywords: Cc:


Gregorian.generic.toTime(0, 0, 0, 0, 0, 0, 0, 0);

-> ArrayBoundsException? at Gregorian.d(343)

An assertion with a more meaningful error message should exist. I'd prefer a full-blown IllegalArgumentException?, but either's good enough, as long as I don't have to delve into the source of Gregorian to figure out what exactly went wrong.

Similar checks should be done to make sure the whole value falls into the range supported by Time, to avoid possible underflows and overflows.

Change History

12/27/07 15:56:18 changed by schveiguy

  • status changed from new to assigned.

12/27/07 15:56:30 changed by schveiguy

  • milestone set to 0.99.5.

02/11/08 05:50:47 changed by schveiguy

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [3166]) Updated documentation on TimeSpan? and Time to show construction from ticks Added exception throwing for illegal arguments in Gregorian (fixes #826)