Tuto WINDEV 25

394 Part 7: Advanced programming Overview The errors can be automatically managed by WINDEV. This feature helps you reduce the number of code lines while centralizing the management of errors. The use of this feature also makes the code easier to read. Operating mode Two operations are performed when an error is detected by a WLanguage function: • an error value is returned by the function (for example, fOpen returns "-1" if the specified file was not opened). • the error is detected by WLanguage (the ErrorOccurred variable is set to True) and the error details are returned by ErrorInfo . This second operation can be automatically managed by the error management of WINDEV. Implementation The automatic management of errors can be configured: • in the code editor: all you have to do is click the link "If error: By program" in the code editor: • by programming with ErrorChangeParameter .

RkJQdWJsaXNoZXIy NDQ0OA==