flash.events

# HTMLUncaughtScriptExceptionEvent - AS3

Package | flash.events
Class | public class HTMLUncaughtScriptExceptionEvent
Inheritance | HTMLUncaughtScriptExceptionEvent Event Object

Runtime Versions: | AIR 1.0

An HTMLLoader object dispatches an HTMLUncaughtScriptExceptionEvent object whenever a JavaScript exception is thrown and not handled with a `catch` statement.

Related API Elements

HTMLLoader

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | bubbles : Boolean [read-only] Indicates whether an event is a bubbling event. | Event
|  | cancelable : Boolean [read-only] Indicates whether the behavior associated with the event can be prevented. | Event
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | currentTarget : Object [read-only] The object that is actively processing the Event object with an event listener. | Event
|  | eventPhase : uint [read-only] The current phase in the event flow. | Event
|  | exceptionValue : * The result of evaluating the expression in the throw statement that resulted in the uncaught exception. | HTMLUncaughtScriptExceptionEvent
|  | stackTrace : Array An array of objects that represent the stack trace at the time the throw statement that resulted in the uncaught exception was executed. | HTMLUncaughtScriptExceptionEvent
|  | target : Object [read-only] The event target. | Event
|  | type : String [read-only] The type of event. | Event

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | HTMLUncaughtScriptExceptionEvent(exceptionValue:*) Creates an HTMLUncaughtScriptExceptionEvent object to pass as a parameter to event listeners. | HTMLUncaughtScriptExceptionEvent
|  | clone():Event [override] Creates a copy of the HTMLUncaughtScriptExceptionEvent object and sets the value of each property to match that of the original. | HTMLUncaughtScriptExceptionEvent
|  | formatToString(className:String, ... arguments):String A utility function for implementing the toString() method in custom ActionScript 3.0 Event classes. | Event
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isDefaultPrevented():Boolean Checks whether the preventDefault() method has been called on the event. | Event
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | preventDefault():void Cancels an event's default behavior if that behavior can be canceled. | Event
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | stopImmediatePropagation():void Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow. | Event
|  | stopPropagation():void Prevents processing of any event listeners in nodes subsequent to the current node in the event flow. | Event
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns a string containing all the properties of the Event object. | Event
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined By
--- | --- | ---
|  | UNCAUGHT_SCRIPT_EXCEPTION : * = uncaughtScriptException [static] The HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION constant defines the value of the type property of an uncaughtScriptException event object. | HTMLUncaughtScriptExceptionEvent

Property Detail

### exceptionValue

property

`public var exceptionValue:*`

Runtime Versions: | AIR 1.0

The result of evaluating the expression in the throw statement that resulted in the uncaught exception. The `exceptionValue` property can be a primitive value, a reference to a JavaScript object, or a reference to an ActionScript object.

### stackTrace

property

`stackTrace:Array`

Runtime Versions: | AIR 1.0

An array of objects that represent the stack trace at the time the throw statement that resulted in the uncaught exception was executed. Each object in the array has three properties:

- `sourceURL` (a string): The URL of the script of the call stack frame.
- `line` (a number): The line number in the `sourceURL` resource of the call stack frame.
- `functionName` (a string): The name of the function for the call stack frame.

Implementation
`public function get stackTrace():Array`
`public function set stackTrace(value:Array):void`
Constructor Detail

### HTMLUncaughtScriptExceptionEvent

()
Constructor

`public function HTMLUncaughtScriptExceptionEvent(exceptionValue:*)`

Runtime Versions: | AIR 1.0

Creates an HTMLUncaughtScriptExceptionEvent object to pass as a parameter to event listeners.

Parameters

| `exceptionValue:*` — When a JavaScript process throws an uncaught exception, the `exceptionValue` is the result of evaluating the expression in the throw statement that resulted in the uncaught exception. The `exceptionValue` property can be a primitive value, a reference to a JavaScript object, or a reference to an ActionScript object.

Method Detail

### clone

()
method

`override public function clone():Event`

Runtime Versions: | AIR 1.0

Creates a copy of the HTMLUncaughtScriptExceptionEvent object and sets the value of each property to match that of the original.

Returns

| `Event` — The copy of the HTMLUncaughtScriptExceptionEvent object.

Constant Detail

### UNCAUGHT_SCRIPT_EXCEPTION

Constant

`public static const UNCAUGHT_SCRIPT_EXCEPTION:* = uncaughtScriptException`

Runtime Versions: | AIR 1.0

The `HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION` constant defines the value of the `type` property of an `uncaughtScriptException` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `false`
`cancelable` | `false`; there is no default behavior to cancel.
`exceptionValue` | The result of evaluating the expression in the `throw` statement that resulted in the uncaught exception.
`stackTrace` | An array of objects that represent the stack trace at the time the `throw` statement that resulted in the uncaught exception was executed.
`target` | The HTMLLoader object.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00