Overview
Features
Download
Documentation
Community
Add-Ons & Services

No way to check precondition for DateTime constructor

General discussion regarding the development of POCO for contributors.

No way to check precondition for DateTime constructor

Postby marlowa » 25 Jul 2006, 00:48

The DateTime constructor requires that the year, month, day etc are for a valid date/time but there is no way for the caller to check that this precondition is satisified. Why not provide a static isValid method. The poco_assert will try to invoke the debugger so the caller (IMO) should not assume that he can catch any assertion that the constructor will throw. So he needs to be able to check the precondition himself.

-Andrew Marlow
marlowa
 
Posts: 36
Joined: 19 Jul 2006, 09:02
Location: United_Kingdom

Re: No way to check precondition for DateTime constructor

Postby guenter » 26 Jul 2006, 08:27

> The DateTime constructor requires that the year, month, day etc are for a valid date/time but there is no way for the caller to check that this precondition is satisified.

ok, isValid() will be in the next release.
guenter
 
Posts: 1135
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Contributors

Who is online

Users browsing this forum: No registered users and 2 guests