Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: C++
Expertise: All
Feb 21, 2002



Building the Right Environment to Support AI, Machine Learning and Deep Learning

A Recommended Exception Handling Policy

Exceptions report abnormal runtime situations. Although you have other mechanisms for detecting and reporting runtime errors, exceptions are advantageous because they automate the process of passing the error from a deep down infrastructure function to the highest function in the call chain. In general, infrastructure functions such as memory management routines and hardware access system calls are the first to detect abnormal runtime conditions, e.g., corrupted files, heap exhaustion and a broken disk. Yet they know very little about the application that invoked them. Therefore, they cannot—and shouldn't—try to handle the exception by themselves. Instead, they should throw the exception propagating it on up in the call chain so that an appropriate handler will deal with it.
Danny Kalev
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date