How handle the warnings |
[eluser]vamsee[/eluser]
I got following warning Severity: Warning Message: Division by zero But i would like to handle warning too. This is my code Code: try
[eluser]n0xie[/eluser]
An exception is not a warning. Hence you can't 'catch' a warning, since it doesn't stop your script from executing. You could suppress the error (either by prepending it with an @ or set your ERROR LEVEL to something that suppresses the warning). You could also change the behaviour of PHP when it encounters a warning by setting an error handler
[eluser]WanWizard[/eluser]
You can also try to write code with proper validation, so the exception is caught and handled before it triggers a PHP warning...
[eluser]vamsee[/eluser]
[quote author="vamsee" date="1287492578"]I got following warning [Solved] Severity: Warning Message: Division by zero But i would like to handle warning too. This is my code Code: try |
Welcome Guest, Not a member yet? Register Sign In |