<throw>
<throw>
The <throw>
element throws an event. These can be predefined ones or application-defined events.
Attributes
event
The event being thrown.
eventexpr
An ECMAScript expression evaluating to the name of the event being thrown.
message
A message string providing additional context about the event being thrown. The message is available as the value of “_message” within the scope of the catch element.
messageexpr
An ECMAScript expression evaluating to the message string.
Notes
Exactly one of “event” and “eventexpr” must be specified. Exactly one of “message” and “messageexpr” may be specified.
Example
The output of the above script would be:
Computer: Caught my event with the following message: Computer: hello, world!
Child Tags
None
Parent Tags
<block>, <catch>, <error>, <filled>, <foreach>, <help>, <if>, <noinput>, <nomatch>
Last updated