Re: Try/Catch

new topic     » goto parent     » topic index » view thread      » older message » newer message
Shian_Lee said...

Please explain me briefly, using simple words, why exception handling became norm in computer programming.

The obvious example is the web browser. Imagine, say, amazon.com: there is text in various fonts, colours and sizes, lines, icons, pictures, zoom-able pictures, videos, bar charts, bullet points, shrinking and expanding sections, hyperlinks, buttons, etc. Other sites have word documents, pdfs, powerpoint presentations, excel spreadsheets, and so on, all of which can be displayed directly in the browser. You can also add client-side javascript, html5, css and more of the like to the bucket. That is a lot of things that you and I have no control over, that can go wrong in a multitude of different ways.

In my own programs, I almost always use long-handed and tedious error code (aka return value) handling. But I have to accept there is a real and imperfect world out there.

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu