Package org.eclipse.jdt.debug.core
Interface IJavaExceptionBreakpoint
-
- All Superinterfaces:
IAdaptable,IBreakpoint,IJavaBreakpoint,ITriggerPoint
public interface IJavaExceptionBreakpoint extends IJavaBreakpoint
A breakpoint that suspends execution when a corresponding exception is thrown in a target VM. An exception breakpoint can be configured to suspend execution when the corresponding exception is thrown in a caught or uncaught location. As well, the location can be filtered inclusively or exclusively by type name patterns.- Since:
- 2.0
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIJavaExceptionBreakpoint.SuspendOnRecurrenceStrategyConstants for telling the debugger for each exception breakpoint how to handle multiple occurrences of the same exception instance, which can happen via re-throwing or multiple finally clauses in the call stack.
-
Field Summary
-
Fields inherited from interface org.eclipse.debug.core.model.IBreakpoint
BREAKPOINT_MARKER, ENABLED, ID, LINE_BREAKPOINT_MARKER, PERSISTED, REGISTERED
-
Fields inherited from interface org.eclipse.jdt.debug.core.IJavaBreakpoint
SUSPEND_THREAD, SUSPEND_VM
-
Fields inherited from interface org.eclipse.debug.core.model.ITriggerPoint
TRIGGERPOINT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description StringgetExceptionTypeName()Returns the fully qualified type name of the exception that last caused this breakpoint to suspend, ofnullif this breakpoint has not caused a thread to suspend.String[]getExclusionFilters()Returns the exclusive filters that define the scope for the associated exception.String[]getFilters()Deprecated.Use getExclusionFilters() or getInclusionFilters()String[]getInclusionFilters()Returns the inclusive filters that define the scope for the associated exception.IJavaExceptionBreakpoint.SuspendOnRecurrenceStrategygetSuspendOnRecurrenceStrategy()Answer this breakpoint'sstrategyfor suspending on recurrences of the same exception instance.booleanisCaught()Returns whether this breakpoint suspends execution when the associated exception is thrown in a caught location (in a try/catch statement).booleanisChecked()Returns whether the exception associated with this breakpoint is a checked exception (compiler detected).booleanisInclusiveFiltered()Deprecated.Exception breakpoints can have a mixed set of filters and this method is maintained strictly for API backwards compatibilitybooleanisUncaught()Returns whether this breakpoint suspends execution when the associated exception is thrown in an uncaught location (not caught by a try/catch statement).voidsetCaught(boolean caught)Sets whether this breakpoint suspends execution when the associated exception is thrown in a caught location (in a try/catch statement).voidsetExclusionFilters(String[] filters)Sets the exclusion filters that will define the scope for the associated exception.voidsetFilters(String[] filters, boolean inclusive)Deprecated.Exception breakpoints can have a mixed set of filters.voidsetInclusionFilters(String[] filters)Sets the inclusion filters that will define the scope for the associated exception.voidsetSuspendOnRecurrenceStrategy(IJavaExceptionBreakpoint.SuspendOnRecurrenceStrategy strategy)Define this breakpoint'sstrategyfor suspending on recurrences of the same exception instance.voidsetUncaught(boolean uncaught)Sets whether this breakpoint suspends execution when the associated exception is thrown in an uncaught location.-
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Methods inherited from interface org.eclipse.debug.core.model.IBreakpoint
delete, getMarker, getModelIdentifier, isEnabled, isPersisted, isRegistered, setEnabled, setMarker, setPersisted, setRegistered
-
Methods inherited from interface org.eclipse.jdt.debug.core.IJavaBreakpoint
addBreakpointListener, addInstanceFilter, getBreakpointListeners, getHitCount, getInstanceFilters, getSuspendPolicy, getThreadFilter, getThreadFilters, getTypeName, isInstalled, removeBreakpointListener, removeInstanceFilter, removeThreadFilter, setHitCount, setSuspendPolicy, setThreadFilter, supportsInstanceFilters, supportsThreadFilters
-
Methods inherited from interface org.eclipse.debug.core.model.ITriggerPoint
isTriggerPoint, setTriggerPoint
-
-
-
-
Method Detail
-
setInclusionFilters
void setInclusionFilters(String[] filters) throws CoreException
Sets the inclusion filters that will define the scope for the associated exception. Filters are a collection of strings of type name prefixes. Default packages should be specified as the empty string.- Parameters:
filters- the array of filters to apply- Throws:
CoreException- if unable to set the property on this breakpoint's underlying marker- Since:
- 2.1
-
getInclusionFilters
String[] getInclusionFilters() throws CoreException
Returns the inclusive filters that define the scope for the associated exception. Filters are a collection of strings of type name prefixes.- Returns:
- the array of defined inclusive filters
- Throws:
CoreException- if unable to access the property on this breakpoint's underlying marker- Since:
- 2.1
-
isCaught
boolean isCaught() throws CoreExceptionReturns whether this breakpoint suspends execution when the associated exception is thrown in a caught location (in a try/catch statement).- Returns:
trueif this is a caught exception breakpoint- Throws:
CoreException- if unable to access the property from this breakpoint's underlying marker
-
isUncaught
boolean isUncaught() throws CoreExceptionReturns whether this breakpoint suspends execution when the associated exception is thrown in an uncaught location (not caught by a try/catch statement).- Returns:
trueif this is an uncaught exception breakpoint.- Throws:
CoreException- if unable to access the property from this breakpoint's underlying marker
-
setCaught
void setCaught(boolean caught) throws CoreExceptionSets whether this breakpoint suspends execution when the associated exception is thrown in a caught location (in a try/catch statement).- Parameters:
caught- whether or not this breakpoint suspends execution when the associated exception is thrown in a caught location- Throws:
CoreException- if unable to set the property on this breakpoint's underlying marker
-
setUncaught
void setUncaught(boolean uncaught) throws CoreExceptionSets whether this breakpoint suspends execution when the associated exception is thrown in an uncaught location.- Parameters:
uncaught- whether or not this breakpoint suspends execution when the associated exception is thrown in an uncaught location- Throws:
CoreException- if unable to set the property on this breakpoint's underlying marker
-
isChecked
boolean isChecked() throws CoreExceptionReturns whether the exception associated with this breakpoint is a checked exception (compiler detected).- Returns:
trueif the exception associated with this breakpoint is a checked exception- Throws:
CoreException- if unable to access the property from this breakpoint's underlying marker
-
getExceptionTypeName
String getExceptionTypeName()
Returns the fully qualified type name of the exception that last caused this breakpoint to suspend, ofnullif this breakpoint has not caused a thread to suspend. Note that this name may be a sub type of the exception that this breakpoint is associated with.- Returns:
- fully qualified exception name or
null
-
setFilters
@Deprecated void setFilters(String[] filters, boolean inclusive) throws CoreException
Deprecated.Exception breakpoints can have a mixed set of filters. Use setInclusiveFilters(String[] filters) or setExclusiveFilters(String[] filters)Sets the filters that will define the scope for the associated exception. Filters are a collection of strings of type name prefixes. Default packages should be specified as the empty string.- Parameters:
filters- the array of filters to applyinclusive- whether or not to apply the filters as inclusive or exclusive- Throws:
CoreException- if unable to set the property on this breakpoint's underlying marker
-
setExclusionFilters
void setExclusionFilters(String[] filters) throws CoreException
Sets the exclusion filters that will define the scope for the associated exception. Filters are a collection of strings of type name prefixes. Default packages should be specified as the empty string.- Parameters:
filters- the array of filters to apply- Throws:
CoreException- if unable to set the property on this breakpoint's underlying marker- Since:
- 2.1
-
getFilters
@Deprecated String[] getFilters() throws CoreException
Deprecated.Use getExclusionFilters() or getInclusionFilters()Returns the filters that define the scope for the associated exception. Filters are a collection of strings of type name prefixes.- Returns:
- the array of defined filters
- Throws:
CoreException- if unable to access the property on this breakpoint's underlying marker
-
getExclusionFilters
String[] getExclusionFilters() throws CoreException
Returns the exclusive filters that define the scope for the associated exception. Filters are a collection of strings of type name prefixes.- Returns:
- the array of defined inclusive filters
- Throws:
CoreException- if unable to access the property on this breakpoint's underlying marker- Since:
- 2.1
-
isInclusiveFiltered
@Deprecated boolean isInclusiveFiltered() throws CoreException
Deprecated.Exception breakpoints can have a mixed set of filters and this method is maintained strictly for API backwards compatibilityReturns whether any inclusive filters have been applied.- Returns:
trueif the inclusive filters have been applied- Throws:
CoreException- if unable to access the property on this breakpoint's underlying marker
-
setSuspendOnRecurrenceStrategy
void setSuspendOnRecurrenceStrategy(IJavaExceptionBreakpoint.SuspendOnRecurrenceStrategy strategy) throws CoreException
Define this breakpoint'sstrategyfor suspending on recurrences of the same exception instance.- Parameters:
strategy- the new strategy- Throws:
CoreException- if accessing the breakpoint's marker failed- Since:
- 3.14
- See Also:
getSuspendOnRecurrenceStrategy()
-
getSuspendOnRecurrenceStrategy
IJavaExceptionBreakpoint.SuspendOnRecurrenceStrategy getSuspendOnRecurrenceStrategy() throws CoreException
Answer this breakpoint'sstrategyfor suspending on recurrences of the same exception instance.- Returns:
- the strategy
- Throws:
CoreException- if accessing the breakpoint's marker failed- Since:
- 3.14
- See Also:
setSuspendOnRecurrenceStrategy(SuspendOnRecurrenceStrategy)
-
-