This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy patherrorDialog.lcdoc
More file actions
69 lines (49 loc) · 2.29 KB
/
errorDialog.lcdoc
File metadata and controls
69 lines (49 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Name: errorDialog
Type: message
Syntax: errorDialog <pExecutionError>, <pParseError>
Summary:
Sent to an <object(glossary)> when one of its <handler|handlers> cannot
be run due to an <execution error>.
Associations: stack
Introduced: 1.0
OS: mac, windows, linux
Platforms: desktop, server
Example:
on errorDialog pExecutionError, pParseError
answer "An error occurred on line: " & item 2 \
of line 1 of pExecutionError
end errorDialog
Parameters:
pExecutionError: Describes the error that occurred in the form of a
standard LiveCode error backtrace: error-code,line-number,column-number[,
hint]
pParseError: Deprecated
Description:
Handle the <errorDialog> <message> to prevent the standard error window
from appearing, when you want to <handle> the <error> in a custom
handler.
Standard error descriptions are stored in the cErrorsList of the first
card of stack "revErrorDisplay". The error-code refers to the line
number in this custom property which contains the error description.
You can look up the description of an error using this line of code:
answer line (item 1 of line 1 of pExecutionError) of the scriptExecutionErrors
>*Note:* The exact <format> of the <executionError> may change from
> release to release.
If the <lockErrorDialogs> <property> is true, the <errorDialog> <message>
is sent to the <object(glossary)> that set the <lockErrorDialogs>,
rather than to the <object(glossary)> whose <script> contained the
error. The <lockErrorDialogs> can be set to true either by setting the
<property> directly, or with the <lock error dialogs> <command>.
>*Note:* The <errorDialog> message is only sent while Script Debug mode
> is turned off. To toggle Script Debug mode, click on the Development
> menu of LiveCode's menubar.
Changes:
The <pExecutionError> parameter was introduced in version 1.1. In previous
versions, this information was stored in the executionError property.
References: lock error dialogs (command), unlock error dialogs (command),
interrupt (function), format (function), errorObject (function),
object (glossary), property (glossary), handle (glossary),
handler (glossary), error (glossary), message (glossary),
execution error (glossary), command (glossary),
scriptParsingError (message), executionContexts (property),
lockErrorDialogs (property), script (property)