APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.web

public final Class WebErrorEvent

extends Event
Class Inheritance
Imports
javafx.beans.NamedArg, javafx.event.Event, .EventType

An event indicating a WebEngine error. Holds an optional text message and an optional exception associated with the error.
Since
JavaFX 8.0
See Also
WebEngine.onError

Field Summary

Modifier and TypeField and Description
public static final EventType<WebErrorEvent>
ANY

Hides javafx.event.Event.ANY.

Common supertype for all WebErrorEvent types.
private final Throwable
private final String
public static final EventType<WebErrorEvent>
USER_DATA_DIRECTORY_ALREADY_IN_USE

This event occurs when a WebEngine detects that its user data directory is already in use by a WebEngine running in a different VM.

public static final EventType<WebErrorEvent>
USER_DATA_DIRECTORY_IO_ERROR

This event occurs when a WebEngine encounters an I/O error while trying to create or access the user data directory.

public static final EventType<WebErrorEvent>
USER_DATA_DIRECTORY_SECURITY_ERROR

This event occurs when a WebEngine encounters a security error while trying to create or access the user data directory.

Inherited from javafx.event.Event:
consumedeventTypeNULL_SOURCE_TARGETtarget

Constructor Summary

AccessConstructor and Description
public
WebErrorEvent(Object
the event source which sent the event
source
,
EventType<WebErrorEvent>
the event type
type
,
String
the text message associated with the event; may be null
message
,
Throwable
the exception associated with the event; may be null
exception
)

Creates a new WebErrorEvent.

Method Summary

Modifier and TypeMethod and Description
public Throwable

Returns:

the exception associated with this event, or null if there is no such exception
getException
()

Returns the exception associated with this event.

public String

Returns:

the text message associated with this event, or null if there is no such message
getMessage
()

Returns the text message associated with this event.

public String
toString()

Overrides java.util.EventObject.toString.

Returns a String representation of this EventObject.

Inherited from javafx.event.Event:
cloneconsumecopyForfireEventgetEventTypegetTargetisConsumed

Field Detail

ANYback to summary
public static final EventType<WebErrorEvent> ANY

Hides javafx.event.Event.ANY.

Common supertype for all WebErrorEvent types.

exceptionback to summary
private final Throwable exception
Annotations
@SuppressWarnings:doclint:missing
messageback to summary
private final String message
Annotations
@SuppressWarnings:doclint:missing
USER_DATA_DIRECTORY_ALREADY_IN_USEback to summary
public static final EventType<WebErrorEvent> USER_DATA_DIRECTORY_ALREADY_IN_USE

This event occurs when a WebEngine detects that its user data directory is already in use by a WebEngine running in a different VM.

In general, multiple WebEngine instances may share a single user data directory as long as they run in the same VM. WebEngine instances running in different VMs are not allowed to share the same user data directory.

When a WebEngine is about to start loading a web page or executing a script for the first time, it checks whether its userDataDirectory is already in use by a WebEngine running in a different VM. If the latter is the case, the WebEngine invokes the WebEngine.onError event handler, if any, with a USER_DATA_DIRECTORY_ALREADY_IN_USE event. If the invoked event handler modifies the userDataDirectory property, the WebEngine retries with the new user data directory as soon as the handler returns. If the handler does not modify the userDataDirectory property (which is the default), the WebEngine continues without the user data directory.

USER_DATA_DIRECTORY_IO_ERRORback to summary
public static final EventType<WebErrorEvent> USER_DATA_DIRECTORY_IO_ERROR

This event occurs when a WebEngine encounters an I/O error while trying to create or access the user data directory.

When a WebEngine is about to start loading a web page or executing a script for the first time, it checks whether it can create or access its userDataDirectory. If the check fails with an I/O error (such as java.io.IOException), the WebEngine invokes the WebEngine.onError event handler, if any, with a USER_DATA_DIRECTORY_IO_ERROR event. If the invoked event handler modifies the userDataDirectory property, the WebEngine retries with the new user data directory as soon as the handler returns. If the handler does not modify the userDataDirectory property (which is the default), the WebEngine continues without the user data directory.

USER_DATA_DIRECTORY_SECURITY_ERRORback to summary
public static final EventType<WebErrorEvent> USER_DATA_DIRECTORY_SECURITY_ERROR

This event occurs when a WebEngine encounters a security error while trying to create or access the user data directory.

When a WebEngine is about to start loading a web page or executing a script for the first time, it checks whether it can create or access its userDataDirectory. If the check fails with a security error (such as java.lang.SecurityException), the WebEngine invokes the WebEngine.onError event handler, if any, with a USER_DATA_DIRECTORY_SECURITY_ERROR event. If the invoked event handler modifies the userDataDirectory property, the WebEngine retries with the new user data directory as soon as the handler returns. If the handler does not modify the userDataDirectory property (which is the default), the WebEngine continues without the user data directory.

Constructor Detail

WebErrorEventback to summary
public WebErrorEvent(Object source, EventType<WebErrorEvent> type, String message, Throwable exception)

Creates a new WebErrorEvent.

Parameters
source:Object

the event source which sent the event

type:EventType<WebErrorEvent>

the event type

message:String

the text message associated with the event; may be null

exception:Throwable

the exception associated with the event; may be null

Method Detail

getExceptionback to summary
public Throwable getException()

Returns the exception associated with this event.

Returns:Throwable

the exception associated with this event, or null if there is no such exception

getMessageback to summary
public String getMessage()

Returns the text message associated with this event.

Returns:String

the text message associated with this event, or null if there is no such message

toStringback to summary
public String toString()

Overrides java.util.EventObject.toString.

Doc from java.util.EventObject.toString.

Returns a String representation of this EventObject.

Annotations
@Override