Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » FP exception vs NaN
Re: Capture division by zero [message #55305 is a reply to message #55299] |
Wed, 28 October 2020 09:29   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Klugier wrote on Tue, 27 October 2020 20:35Hello,
I slowly stop understanding what this thread is about? I think it is perfectly fine to validate input each time it can be wrong - this is the secure coding principles. So, in example bring by kold when i (-1) "v(2); v[i] = 2;", we should always check and handling appropriate. The same is true for divided by zero problem.
The only problem I have is that the CrashHandler is forced by using SysInfo package on Debug mode. For me the class should not be there in nay cases. If you would like to write such debug code just do it in your application not in the library. This is my postulate. If this code will help you find errors in your application that's fine, but use it only there.
EDIT: I saw that crash handler was removed from SysInfo. Thanks!
Klugier
CrashHandler capture of FP errors was activated only in DEBUG mode, like U++ Vector bounds calculation: no overhead added to RELEASE.
U++ Vector bounds check is forced by default in DEBUG. It seemed fair to do the same with other errors.
Best regards
IƱaki
[Updated on: Wed, 28 October 2020 09:30] Report message to a moderator
|
|
|
 |
|
FP exception vs NaN
By: koldo on Mon, 26 October 2020 21:08
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 09:23
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 11:09
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 11:16
|
 |
|
Re: Capture division by zero
By: koldo on Tue, 27 October 2020 11:38
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 11:40
|
 |
|
Re: Capture division by zero
By: koldo on Tue, 27 October 2020 11:36
|
 |
|
Re: Capture division by zero
By: koldo on Tue, 27 October 2020 17:18
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 18:52
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 19:19
|
 |
|
Re: Capture division by zero
By: koldo on Tue, 27 October 2020 19:25
|
 |
|
Re: Capture division by zero
By: Klugier on Tue, 27 October 2020 20:35
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 20:47
|
 |
|
Re: Capture division by zero
By: koldo on Wed, 28 October 2020 09:29
|
 |
|
Re: Capture division by zero
By: mirek on Tue, 27 October 2020 20:50
|
 |
|
Re: Capture division by zero
By: koldo on Wed, 28 October 2020 09:24
|
 |
|
Re: Capture division by zero
By: mirek on Wed, 28 October 2020 13:51
|
 |
|
Re: Capture division by zero
By: mirek on Wed, 28 October 2020 14:04
|
 |
|
Re: Capture division by zero
By: koldo on Thu, 29 October 2020 14:19
|
 |
|
Re: Capture division by zero
By: mirek on Mon, 02 November 2020 10:31
|
 |
|
Re: Capture division by zero
By: koldo on Mon, 02 November 2020 18:07
|
Goto Forum:
Current Time: Wed Apr 30 00:47:39 CEST 2025
Total time taken to generate the page: 0.03738 seconds
|