title | description | ms.author | ms.date | ms.topic | author | ms.reviewer |
---|---|---|---|---|---|---|
AppSourceCop Error AS0058 |
Only use AssertError in Test Codeunits. |
solsen |
05/14/2024 |
reference |
SusanneWindfeldPedersen |
solsen |
Only use AssertError in Test Codeunits
Only use AssertError in Test Codeunits.
AssertError must be used only in test codeunits, because it creates its own transaction scope. This can lead to unexpected behaviors when used in production code.
For more information about the usage of AssertError, see:
Error handling in production code must be done using Try Methods.
For more information, see:
AppSourceCop Analyzer
Get Started with AL
Developing Extensions
CodeCop AA0161