This page was last modified 07:40, 7 April 2008.
CS000882 - Using TRAP IGNORE in a backward-compatible manner
From Forum Nokia Wiki
| ID | CS000882 | Creation date | April 7, 2008 |
| Platform | S60 2nd Edition | Tested on devices | |
| Category | Symbian C++ | Subcategory | Code Examples |
| Keywords (APIs, classes, methods, functions): TRAP_IGNORE, TTrap |
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.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to debug and trace on the symbian ? | tiger zhou | General Symbian C++ | 4 | 2006-02-13 15:14 |
| TRAPD does not work on CImageDecoder::FileNewL | ed_welch | General Symbian C++ | 26 | 2008-02-19 09:24 |
| Another UI problem (tree menu) | Pepper_91 | Mobile Java Media (Graphics & Sounds) | 4 | 2005-10-08 10:00 |
| 6230i is compatible with GPS module LD-3W? | sorente | Mobile Java General | 1 | 2006-12-26 20:05 |
| DivideByZero exception handling | alexdoor73 | General Symbian C++ | 1 | 2003-10-01 15:03 |

