Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^4: Surviving 'Illegal division by zero'

by melora (Scribe)
on Jun 24, 2004 at 02:34 UTC ( #369228=note: print w/replies, xml ) Need Help??

in reply to Re^3: Surviving 'Illegal division by zero'
in thread Surviving 'Illegal division by zero'

I agree, especially from the viewpoint of maintainability. Better to handle such situations (there may be cases other than division by zero which need special attention) in one encapsulated place. The other choices are to dig through all the code, restructuring where needed to handle the exceptional case, or to try to capture the exception (which tells you when the problem has happened rather than letting you avoid it).
  • Comment on Re^4: Surviving 'Illegal division by zero'

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://369228]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2023-03-22 06:00 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (60 votes). Check out past polls.