18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

No exception when we divide number with zero

edited November -1 in Sahi - Open Source
Hi,

Please have a glance at the below code.

var $a=10;
var $b=0;

var $c=Number($a)/ Number($b);
_alert($c);
//_continueOnError();
_alert("good bye");

when we run the same logic in other programming languages exception thrown. but we didnot get any exception in sahi if we run.

Please reply some one...


Regards
Shreedhar

Comments

  • Hi shreedhar

    I'd say, how to handle divison by zero is up to the developer as long as you are not bound to any standards. You could say the result is "NaN" "0" or " Infinity" and decide for yourself if there is a need for an exception.
    As long as it doesn't compromises the tests, I don't care if there is an exception for I wont solve higher math problems with sahi :)

    Regards
    Wormi
Sign In or Register to comment.