<doc>
  <legacy_id>1374</legacy_id>
  <name>errorDialog</name>
  <type>message</type>
  <syntax>
    <example>errorDialog <i>executionError</i>, <i>parseError</i></example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
    <card/>
    <group/>
    <field/>
    <button/>
    <graphic/>
    <scrollbar/>
    <player/>
    <image/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Writing LiveCode</category>
  </classification>
  <references>
    <command tag="unlock error dialogs">unlock error dialogs Command</command>
    <function tag="errorObject">errorObject Function</function>
    <function tag="interrupt">interrupt Function</function>
    <message tag="scriptParsingError">scriptParsingError Message</message>
    <property tag="executionContexts">executionContexts Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
    <changed version="1.1"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Sent to an <glossary tag="object">object</glossary> when one of its <glossary tag="handler">handlers</glossary> cannot be run due to an <glossary tag="execution error">execution error</glossary>.</summary>
  <examples>
    <example>on errorDialog pExecutionError, pParseError</p><p>    answer "An error occurred on line: " &amp; item 2 of line 1 of pExecutionError</p><p>end errorDialog</example>
  </examples>
  <description>
    <p>Handle the <b>errorDialog</b> <keyword tag="message box">message</keyword> to prevent the standard error window from appearing, when you want to <glossary tag="handle">handle</glossary> the <glossary tag="error">error</glossary> in a custom handler.</p><p/><p><b>Parameters:</b></p><p>The <b>errorDialog</b> message is sent with two parameters.</p><p>The <i>executionError</i> describes the error that occurred.</p><p>The <i>parseError</i> is deprecated.</p><p/><p>The <i>executionError</i> parameter is a standard LiveCode error backtrace in the form:</p><p>&lt;error-code&gt;,&lt;line-number&gt;,&lt;column-number&gt;[,&lt;hint&gt;]</p><p/><p><b>Comments:</b></p><p>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.</p><p/><p>You can look up the description of an error using this line of code:</p><p/><p>answer line (item 1 of line 1 of pExecutionError) of the cErrorsList of card 1 of stack "revErrorDisplay"</p><p/><p><b>Note:</b> The exact <function tag="format">format</function> of the <i>executionError</i> may change from release to release.</p><p/><p>If the <b>lockErrorDialogs</b> <glossary tag="property">property</glossary> is true, the <b>errorDialog</b> <keyword tag="message box">message</keyword> is sent to the <glossary tag="object">object</glossary> that set the <property tag="lockErrorDialogs">lockErrorDialogs</property>., rather than to the <glossary tag="object">object</glossary> whose <property tag="script">script</property> contained the error. (The <property tag="lockErrorDialogs">lockErrorDialogs</property> can be set to true either by setting the <glossary tag="property">property</glossary> directly, or with the <command tag="lock error dialogs">lock error dialogs</command> <glossary tag="command">command</glossary>.)</p><p/><p><b>Note:</b> The <b>errorDialog</b> message is only sent while <i>Script Debug mode </i>is turned off. To toggle Script Debug mode, click on the Development menu of LiveCode's menubar.</p><p/><p><b>Changes:</b></p><p>The <i>executionError</i> parameter was introduced in version 1.1. In previous versions, this information was stored in the <href tag="dictionary/property/1237.xml">executionError</href> <glossary tag="property">property</glossary>.</p>
  </description>
</doc>