Tip error management in version 7

Error management in version 6

In Sage X3 version 6, the error management was based on the 'GESECRAN' library that was intended for on-the-fly screens displaying errors. The 'GESECRAN' library has been updated to take into account batch and service processes while keeping it organized around the user interface.

Error management in version 7

In Version 7, the code is organized into services.

This means that the 'GESECRAN' library should no longer be used and the errors should be managed differently.

The main principles are as follows:

Similarly, there is also a variable called "[L]ASTATUS" that is available on every event. To display errors or warnings, it must be done with one of the following lines:

[L]ASTATUS=Fmet ASETERROR("AMOUNT","the amount has been successfully updated", [V]CST_AINFO)[L]ASTATUS=Fmet ASETERROR("MYPROP","The value of MYPROP is exceeding a usual value", [V]CST_AWARNING)[L]ASTATUS=Fmet ASETERROR("","Global inconsistency for the class xxx", [V]CST_AERROR)[L]ASTATUS=Fmet ASETERROR("","A fatal error occured", [V]CST_AFATAL)

The example given previously is not exactly the code that must be written because text constants must be banned from a script unless no translation is necessary. To learn how to handle the translatable texts, see the Constructing messages for improved localisation document.