Jaa


X++ Standards: throw Statements

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

The throw statement automatically initiates a ttsAbort, which is a database transaction rollback.

The throw statement should be used only if a piece of code cannot do what it is expected to do. The throw statement should not be used for more ordinary program flow control.

Always place an explanation of the throw in the Infolog before the actual throw.

Note

Do not use ttsAbort directly; use throw instead.

See also

Exception Handling with try and catch Keywords

X++ Coding Standards

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.