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

2.2. Escalate Errors

Intent

Enhance your error handling by using the Symbian OS Leave mechanism to escalate the responsibility of handling an error up to the point which has enough context to resolve the error.

AKA

Leave and Trap, Error Propagation, Exception Handling, and Separating Error-Handling Code from 'Regular' Code

2.2.1. Problem

2.2.1.1. Context

Your component is part of or contains a layered software stack[] and has to appropriately handle non-fatal domain or system errors.

[] As per the Layers pattern described in [Buschmann et al., 1996] or Model–View–Controller (see page 332).

2.2.1.2. Summary
  • Non-fatal errors must be resolved appropriately so that an application or service can continue to provide the functionality the user expects.

  • There should be a clear separation between code for error handling and the normal flow of execution to reduce development time and maintenance costs by reducing code complexity and increasing software clarity.

  • Error-handling code should not have a significant impact at run time during normal operation.

2.2.1.3. Description

Most well-written software is layered so that high-level abstractions depend on low-level abstractions. For instance, a browser interacts with an end user through its UI code at the highest levels of abstraction. Each time the end user requests a new web page, that request is given to the HTTP subsystem which in turn hands the request to the IP stack at a lower level. At any stage, an error might be encountered that ...

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