Overflow Numbers

So, a while ago, I blogged about an issue with CF’s server-side validation and the maximum size of an integer. Another Team Macromedia member has also ran into an issue with overflow as well. He was using dateDiff, and because the number was so large, it simply ‘rolled over’. (FYI, this is not an MX issue. I ran into this with dateDiff back when I was creating Death Clock, it drove me batty.)

So, the reason I bring it up is this - is there any good reason why numbers should just roll over like this? I know this has caused me multiple hours of issues in the past, as it did for my friend, so why even roll over, why not just throw an exception saying that X was too big?

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support.

Lafayette, LA https://www.raymondcamden.com

Comments