Symbian3/SDK/Source/GUID-EA71F52C-DB4C-500D-9051-31BEF29E171D.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-EA71F52C-DB4C-500D-9051-31BEF29E171D" xml:lang="en"><title>Basic
       
    13 exception support</title><shortdesc>Describes the operating support for exceptions.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>The basic operating system support for exceptions comes from</p>
       
    15 <ul>
       
    16 <li id="GUID-E168AD4F-366A-5EAF-98F2-0C1B187E1AE0"><p>the <codeph>TRAP</codeph> macro
       
    17 and its variant, <codeph>TRAPD</codeph>, which allow code to be run under
       
    18 a <keyword>trap harness</keyword> </p> </li>
       
    19 <li id="GUID-3B4C9F10-A89C-5979-ABC7-5106C7B9AFED"><p>the <codeph>User::Leave()</codeph> call,
       
    20 which terminates the current function, and returns to the trap harness, specifying
       
    21 an error code.</p> </li>
       
    22 </ul>
       
    23 <p>These are analogous to C++’s exception handling support (<codeph>try/catch</codeph> and <codeph>throw</codeph>). </p>
       
    24 <p>By convention, all functions that can leave — directly or indirectly —
       
    25 have an L appended onto their name (and can therefore be referred to as <keyword>L
       
    26 functions</keyword>). The function invoked by a trap harness will always be
       
    27 an L function. </p>
       
    28 </conbody></concept>