How to ignore division by 0 error in macro?

How to get over division by 0 error in macro ?

Is there any way to get over division by 0 in math, as throwing some exception, etc

Hello,

You should not ignore errors nor divide by zero. Check divisor for possibility:

If b <> 0 then
    c = a/b
else
   c = something (possibly a?)
End if

Please note this is not really an LO specific question.