1 try

    <body /> !
    <catch /> !


The code lines could cause an exception must be contained between the start and end mark of the label <body>. The set of actions to execute, if an exception is produced, has to be inside of the tag <catch>.

        <connection.begin />
        <select prefix='m_'>
            <columns>COUNT(*) cnt</columns>
            <from table='gcommovd'>
                <join table='galmctas' alias='a'>
                    <on>gcommovd.ctaori = a.code</on>
                <join table='galmctas' alias='b'>
                    <on>gcommovd.ctades = b.code</on>
                gcommovd.code = <m_tipdoc/> AND
                a.indsal != 'N' AND
                b.indsal != 'N'
        <execute-procedure name='gcommovh'>
                    <from table='gcommovh' />
                    <where>cabid = <m_cabtra/></where>
        <connection.commit />
        <connection.rollback />
        <insert table='tmp_plan_err' columns='errmsg'>

This example code shows a case of transactions use through the sentence <try>. The set of lines that could cause an exception, starts with the start transaction senetence <connection.begin>. In the case of that an unexpected situation between the start and end mark of the label <body>, the block of actions contained in the tag <catch> is executed. This block begans with the element <connection.rollback>, undoing the changes that were performed from the start of the transaction until the instruction that causes the exception.