Namespaces
Variants
Actions

Archived:Using TRAP IGNORE in a backward-compatible manner

Jump to: navigation, search
Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata

Compatibility
Platform(s): S60 2nd Edition

Article
Keywords: TRAP_IGNORE, TTrap
Created: tepaa (01 Apr 2008)
Last edited: lpvalente (04 Aug 2012)

Overview

S60 3rd Edition supports the TRAP_IGNORE template that catches leaves and does nothing on error. You can add TRAP_IGNORE support for older editions of the S60 platform when adding this define into a visible header:

#if !defined(EKA2)
#define TRAP_IGNORE(_s) {TInt _ignore;TTrap __t;if (__t.Trap(_ignore)==0)
{_s;TTrap::UnTrap();}}
#endif

Using this is similar to using it in the S60 3rd Edition platform environment:

TRAP_IGNORE( SomeLeavingFunctionL());

Postconditions

TRAP_IGNORE is supported.

This page was last modified on 4 August 2012, at 21:28.
120 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved