Wednesday, July 4, 2018

Exceptions

An exception is a situation where the flow of a program's execution is
interrupted. Examples of exceptions include the following:


Printing to a printer that is not powered on

Accessing a file that does not exist

Updating a record that does not exist

When these exceptions occur, the program must handle them. For example, if the
user requests a file that does not exist, the program might have to catch the
exception and create a new file.
There are many types of exception thrown, depending on what caused the
exception. A majority of exception types are determined by the kernel and are not
usually thrown by application code. However, all exception types can be caught,
and it is the developer's responsibility to decide which exceptions must be
handled. The exception type is identified using the system enum
Exception.
Because it is a system enum, it cannot be modified. Therefore, users cannot add
new exception types.
Exception Description
info Thrown when a message has been sent to the
Infolog. Do not throw an info exception manually.
warning Thrown when something illegal, although nonfatal,
has occurred.
deadlock Thrown when there is a database deadlock because
several transactions are waiting for one another.
error Thrown when a fatal problem has occurred and the
transaction has stopped.
internal Thrown when Microsoft Dynamics AX encounters
internal development problems at runtime.
break Thrown when the user presses Break or Ctrl+Cduring runtime.
DDEerror Thrown when a problem occurs in the Dynamic
Data Exchange (DDE) system class.
sequence For internal use only.
numeric Thrown when a problem occurs during the use of
any numerical function.
CLRError Thrown when a problem occurs during the use of
the Common Language Runtime (CLR)
functionality.
CodeAccessSecurity Thrown when a problem occurs during the use of
CodeAccessPermission.demand.


UpdateConflict Thrown when a record being updated within a
transaction that is using Optimistic Concurrency
Control, and the recVersion value of the record
buffer and the database record are not equal. The
transaction can be retried (use a retry statement in
the catch block).
UpdateConflict
NotRecovered
Thrown when a transaction using Optimistic
Concurrency Control cannot be completed, and the
code will not be retried.


Best Regards,
Hossein Karimi

No comments:

Post a Comment

Configure the Firewall on the Enterprise Portal Server

After you install Enterprise Portal, enable Web Server (HTTP) in Windows Firewall. If you do not enable the web server in Windows Firewall...