lock error dialogs

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
lock error dialogs
Summary

Sets the lockErrorDialogs property to true, preventing the error window from being displayed when an execution error occurs.

Introduced1.0
OSmac, windows, linux
Platformsdesktop, server
Example
lock error dialogs
if the environment is among the lines of userEnv then lock error dialogs
RelatedProperty: lockErrorDialogs
Message: errorDialog
Command: lock messages, unlock error dialogs
Glossary: object, property, handler, message, command, handle, execution error
Description

Use the lock error dialogs command to handle execution errors in a custom handler, rather than allowing LiveCode to display the standard error window.

The lock error dialogs command sets the lockErrorDialogs property to true.

If an execution error occurs while the lockErrorDialogs property is set to true, an errorDialog message is sent to the object whose handler set the lockErrorDialogs to true.

When all pending handlers are finished executing, the lockErrorDialogs property is set back to false, undoing the lock error dialogs command's action.