Divide By Zero handling
Mike Matthews - Omnis
omnis at lineal.co.uk
Fri Dec 18 13:51:01 EST 2020
Mike Matthews also has spoken to Andreas for help, well he came to me first really.
When I set this property, as a library property, both DEV and RT applications do not report a divide by zero error message. And other error messages I imagine. But no data will show because of data or code issues, so the user is left with no data on the screen, and no warning. So I will allow the user to toggle this library preference.
This came about because I imported data without first validating it correctly by the way, so fix that, and you don’t need to turn off the message. I can hear you all right now telling me this, and right you are. :). But I need to buy some time until next week, and now I have.
And it does prove I’m not dreaming of hearing the Bob’s telling me things while asleep, and that I do in fact listen to what they say in their important briefings.
Mike
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>
www.lineal.co.uk<http://www.lineal.co.uk/>
www.sqlworks.co.uk<http://www.sqlworks.co/>
On 18 Dec 2020, at 13:03, Kelly Burgess <kellyb at montana.com<mailto:kellyb at montana.com>> wrote:
Mike wrote "in v10, it is much more strict" and "was a new $pref added ?"
Xavier wrote "I only get a message in the trace log."
It looks like $clib.$prefs.$reportcalculationerrors is the property that makes the difference. It's in 10.1, but it's also in 8.1.7, so not new, but maybe the default value changed?
When true, a divide by zero stops and barks -- E108080: Divide by zero
When false, a 32bit integer divide by zero results in 2147483647, or 0x7FFFFFFF. That's the maximum value of a 32bit signed integer. No stopping, just the trace log entry saying "Error evaluating calculation: num1/num2 Divide by zero"
I don't know if an error handler would be called in both cases.
Kelly
_____________________________________________________________
Manage your list subscriptions at https://linkprotect.cudasvc.com/url?a=http%3a%2f%2flists.omnis-dev.com&c=E,1,IgEKXTBMB2UGc9oCTpUANOAuZ0iTbwer8TVq5eSYLoKGNhHcfweR9kodTkW6nDqg3V6Mwi35q0yVQ4PsEMPWgxlOd2EYFIc-4XsSkYyFaA,,&typo=1
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list