Article # 295, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
When should I use the EC routines?
Q. Almost every kernel routine (like MemAlloc, FileOpen) can "fail". Should I add EC routines to check for failure? A. No. You always want your application to handle failures (can't open the file or can't allocate memory) gracefully in both EC and non-EC versions. Routines like ECCheckMemHandle or ECCheckFileHandle should be used to check variables as they are passed around the system (when calling routines or messages). This catches mistakes like when other programmers accidentally call your routine with the wrong parameters.