Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Programmer's Guide to MacApp / Part 1 - MacApp Theory and Architecture
Chapter 6 - Scripting


Error Handling

MacApp's global TOSADispatcher object bottlenecks errors in the PreDispatchHandlerGlue and DispatchHandlerGlue methods, and reports them with the ReportDispatchError method. These methods are designed to always "do the right thing" to ensure that errors are handled correctly. The user never sees an alert unless the following statements are both true:

When you write code to handle Apple events, you should never display an error alert directly. When your code that handles Apple events detects an error, it should process the error by calling one of MacApp's failure routines, such as FailOSError or FailNonObject (see "MacApp Error-Checking Routines," beginning on page 562). The error will be caught by the TOSADispatcher object's error-handling bottleneck and handled appropriately.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996