Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2021-09-18 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?