JDBC Driver for REST

Build 24.0.9060

api:finally

The api:finally keyword is used to execute a section of a script after control leaves an api:call, api:try, or api:script statement. It is a convenient way to clean up the formatting of generated documents.

Parameters

None

Control Attributes

None

Examples

The api:finally block is executed when an unhandled exception occurs. This can be used to ensure that tags are closed:

<table>
<api:call op="listCustomers" out="customer">
  <api:first>
    <thead>
        <api:enum item="customer">
          <td>[_attr]</td>
        </api:enum>
    </thead>
  </api:first>
  <tr>
      <api:enum item="customer">
        <td>[_value]</td>
      </api:enum>
  </tr>
  <api:finally>
  </table> <!-- ensure tags are still closed -->
  </api:finally>
</api:call>

See Also

  • api:try: Define a scope to catch exceptions.
  • api:call: Loop over items returned by an operation.
  • api:script: Create a script block.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060