Skip to Content
Common Design Patterns for Symbian OS: The Foundations of Smartphone Software
book

Common Design Patterns for Symbian OS: The Foundations of Smartphone Software

by Adrian A. I. Issott
December 2008
Intermediate to advanced
443 pages
10h 24m
English
Wiley
Content preview from Common Design Patterns for Symbian OS: The Foundations of Smartphone Software

Chapter 2. Error-Handling Strategies

This chapter deals with patterns for handling errors appropriately so that their impact is mitigated and dealt with effectively. We first need to define the categories of software errors that can occur:

  • Domain errors are associated with a particular technology. They indicate that a problem that can be expected to happen at some point in time has occurred. An example of this type of error is getting KErrNotFound as a result of a multimedia application trying to open an audio file specified by the end user. The failure to find the file has a specific meaning for the software receiving the error.

  • System errors are the result of attempting some operation that fails due to a restriction of the system. KErrNoMemory is an obvious example, since it occurs whenever a memory allocation fails due to the memory constraints imposed by the system.

  • Faults occur because of programming errors. They result in abnormal conditions that cause a failure to execute the desired functionality of a particular system. Examples include null pointer dereferences and out-of-bound array accesses. User applications, core system services and the kernel can all suffer faults because of the same common factor: the human engineer.

Some other useful terms we should define here are:

  • Defect – also known as a bug, these are flaws, mistakes and failures in software that prevent it from behaving as intended. All faults are defects but not all defects are faults. For example, software ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Aaron Hillegass, Adam Preble, Nate Chandler

Publisher Resources

ISBN: 9780470516355Purchase book