Thursday, April 27, 2006

Error Handling:

Error Handling:

There are two ways to hanlde the error, one is check the return code of each function, and based on the code returned, determine whether to continue or abort the program.

The other way is to throw an exception , and catch it in the central place, and then determine the appropriate behavior from there.

Thread consideration:
Exceptions should be handled in each sperate thread, if an exception is thrown in a different thread, and not catched in the same thread, it will disapper sliently, and will cause confusion in trouble shooting the issue.

GISResearch

No comments: