Provides a static programming model to throw fault messages.
Remarks
AifFault throws the actual error message to the end user. Compare this to using the error() and warning()
methods of the infolog. In this case a generic message, "Request failed. See the exception log for details",
is thrown to end user.
Do not use AifFault if error message is to be hidden for security reasons.
_reason - A localized string that describes why the fault was logged.
_code - A non-localized string that indicates the reason the fault was logged; optional.
_helpURL - A URL specifying the path to the Microsoft Dynamics AX internal Help system that can be used to open the Help
viewer and present longer, explanatory text; optional.
Returns
Always returns false.
Remarks
This method is similar to the global::checkFailed method but this method logs a fault as a warning.
It can be used in place of the checkFailed method to support both interactive and service code paths.
Throws a single fault with the error message to the end user.
Parameters
_reason - The reason the fault occurred.
_code - The code of the fault.
_detailXml - The details of the fault in Xml; optional.
_helpURL - A URL specifying the path to the Microsoft Dynamics AX internal Help system that can be used to open the Help
viewer and present longer, explanatory text; optional.
Returns
The exception that is thrown to the end user.
Remarks
Throws the returned exception to the end user. Note that,
all other logged faults are not visible to the end user.
Throws a fault with the error message and a list of all logged faults to the end user.
Parameters
_reason - The reason the fault occurred.
_code - The code of the fault.
_detailXml - The details of the fault in Xml; optional.
_helpURL - A URL specifying the path to the Microsoft Dynamics AX internal Help system that can be used to open the Help
viewer and present longer, explanatory text; optional.
Returns
The exception that is thrown to the end user.
Remarks
Throws the returned exception to the end user. Note that,
all other logged faults are NOT visible to the end user.
_defaultReason - The default reason of the fault to be thrown; optional.
_defaultCode - The default code of the fault; optional.
_defaultDetailXml - The default details of the fault in XML; optional.
Returns
The fault message sent to the end user.
Remarks
The method returns a XML message according to the fault schema of AIF. The schema is similar to SOAP 1.2 fault schema.
The XML is created using the last entry in the infolog. If the last entry is not of type AifFault,
the default values are used to generate the XML.
The method is equivalent to constructing an AifFault and then calling serialize.
Use this method in synchronous scenarios where the fault message is constructed from the current infolog.
_helpURL - A URL specifying the path to the Microsoft Dynamics AX internal Help system that can be used to open the Help
viewer and present longer, explanatory text; optional.
Remarks
Throw AifFault.faultList to include all logged faults in the fault message Xml.
Logged faults are ignored if a single fault is thrown, that is, AifFault.fault.
_helpURL - A URL specifying the path to the Microsoft Dynamics AX internal Help system that can be used to open the Help
viewer and present longer, explanatory text; optional.
Remarks
Throw AifFault.faultList to include all logged faults in the fault message Xml.
Note, logged faults are ignored if a single fault is thrown, that is, AifFault.fault.