| |
GeekInterview.com > Interview Questions > Programming
| Print | |
Question: Error-handling Procedure
Answer: In languages without exception-handling facilities, we could send an error-handling procedure as a parameter to each procedure that can detect errors that must be handled. What disadvantages are there to this method? |
| July 07, 2008 19:07:24 |
#1 |
| lavanyats |
Member Since: July 2008 Total Comments: 3 |
RE: Error-handling Procedure |
When there is a new error to be detected, the source code of the exception handling function must be updated - and seperately compiled. Also we have the over head of sending an additional parameter. The best way to deal with exceptions is to use inbuilt exception handling mechanism - and throw custom exceptions.
|
| |
Back To Question | |