Platform SDK: Debugging and Error Handling
Using Error Handling
Notifying the user of errors
Retrieving the last-error code