- java.lang.Object
- 
- java.util.EventObject
- 
- javafx.event.Event
- 
- javafx.scene.web.WebErrorEvent
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- Cloneable
 
 public final class WebErrorEvent extends Event An event indicating aWebEngineerror. Holds an optional text message and an optional exception associated with the error.- Since:
- JavaFX 8.0
- See Also:
- WebEngine.onError, Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static EventType<WebErrorEvent>ANYCommon supertype for allWebErrorEventtypes.static EventType<WebErrorEvent>USER_DATA_DIRECTORY_ALREADY_IN_USEThis event occurs when aWebEnginedetects that its user data directory is already in use by aWebEnginerunning in a different VM.static EventType<WebErrorEvent>USER_DATA_DIRECTORY_IO_ERRORThis event occurs when aWebEngineencounters an I/O error while trying to create or access the user data directory.static EventType<WebErrorEvent>USER_DATA_DIRECTORY_SECURITY_ERRORThis event occurs when aWebEngineencounters a security error while trying to create or access the user data directory.- 
Fields inherited from class javafx.event.Eventconsumed, eventType, NULL_SOURCE_TARGET, target
 - 
Fields inherited from class java.util.EventObjectsource
 
- 
 - 
Constructor SummaryConstructors Constructor Description WebErrorEvent(Object source, EventType<WebErrorEvent> type, String message, Throwable exception)Creates a newWebErrorEvent.
 - 
Method SummaryModifier and Type Method Description ThrowablegetException()Returns the exception associated with this event.StringgetMessage()Returns the text message associated with this event.StringtoString()- 
Methods inherited from class javafx.event.Eventclone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
 - 
Methods inherited from class java.util.EventObjectgetSource
 
- 
 
- 
- 
- 
Field Detail- 
ANYpublic static final EventType<WebErrorEvent> ANY Common supertype for allWebErrorEventtypes.
 - 
USER_DATA_DIRECTORY_ALREADY_IN_USEpublic static final EventType<WebErrorEvent> USER_DATA_DIRECTORY_ALREADY_IN_USE This event occurs when aWebEnginedetects that its user data directory is already in use by aWebEnginerunning in a different VM.In general, multiple WebEngineinstances may share a single user data directory as long as they run in the same VM.WebEngineinstances running in different VMs are not allowed to share the same user data directory.When a WebEngineis about to start loading a web page or executing a script for the first time, it checks whether itsuserDataDirectoryis already in use by aWebEnginerunning in a different VM. If the latter is the case, theWebEngineinvokes theWebEngine.onErrorevent handler, if any, with aUSER_DATA_DIRECTORY_ALREADY_IN_USEevent. If the invoked event handler modifies theuserDataDirectoryproperty, theWebEngineretries with the new user data directory as soon as the handler returns. If the handler does not modify theuserDataDirectoryproperty (which is the default), theWebEnginecontinues without the user data directory.
 - 
USER_DATA_DIRECTORY_IO_ERRORpublic static final EventType<WebErrorEvent> USER_DATA_DIRECTORY_IO_ERROR This event occurs when aWebEngineencounters an I/O error while trying to create or access the user data directory.When a WebEngineis about to start loading a web page or executing a script for the first time, it checks whether it can create or access itsuserDataDirectory. If the check fails with an I/O error (such asjava.io.IOException), theWebEngineinvokes theWebEngine.onErrorevent handler, if any, with aUSER_DATA_DIRECTORY_IO_ERRORevent. If the invoked event handler modifies theuserDataDirectoryproperty, theWebEngineretries with the new user data directory as soon as the handler returns. If the handler does not modify theuserDataDirectoryproperty (which is the default), theWebEnginecontinues without the user data directory.
 - 
USER_DATA_DIRECTORY_SECURITY_ERRORpublic static final EventType<WebErrorEvent> USER_DATA_DIRECTORY_SECURITY_ERROR This event occurs when aWebEngineencounters a security error while trying to create or access the user data directory.When a WebEngineis about to start loading a web page or executing a script for the first time, it checks whether it can create or access itsuserDataDirectory. If the check fails with a security error (such asjava.lang.SecurityException), theWebEngineinvokes theWebEngine.onErrorevent handler, if any, with aUSER_DATA_DIRECTORY_SECURITY_ERRORevent. If the invoked event handler modifies theuserDataDirectoryproperty, theWebEngineretries with the new user data directory as soon as the handler returns. If the handler does not modify theuserDataDirectoryproperty (which is the default), theWebEnginecontinues without the user data directory.
 
- 
 - 
Constructor Detail- 
WebErrorEventpublic WebErrorEvent(Object source, EventType<WebErrorEvent> type, String message, Throwable exception) Creates a newWebErrorEvent.- Parameters:
- source- the event source which sent the event
- type- the event type
- message- the text message associated with the event; may be- null
- exception- the exception associated with the event; may be- null
 
 
- 
 - 
Method Detail- 
getMessagepublic String getMessage() Returns the text message associated with this event.- Returns:
- the text message associated with this event, or
         nullif there is no such message
 
 - 
getExceptionpublic Throwable getException() Returns the exception associated with this event.- Returns:
- the exception associated with this event, or
         nullif there is no such exception
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- EventObject
 
 
- 
 
-