org.osgi.framework

Class InvalidSyntaxException

public class InvalidSyntaxException extends Exception

A Framework exception used to indicate that a filter string has an invalid syntax.

An InvalidSyntaxException object indicates that a filter string parameter has an invalid syntax and cannot be parsed. See Filter for a description of the filter string syntax.

This exception is updated to conform to the general purpose exception chaining mechanism.

Version: $Revision: 1.16 $

Constructor Summary
InvalidSyntaxException(String msg, String filter)
Creates an exception of type InvalidSyntaxException.
InvalidSyntaxException(String msg, String filter, Throwable cause)
Creates an exception of type InvalidSyntaxException.
Method Summary
ThrowablegetCause()
Returns the cause of this exception or null if no cause was specified when this exception was created.
StringgetFilter()
Returns the filter string that generated the InvalidSyntaxException object.
ThrowableinitCause(Throwable cause)
The cause of this exception can only be set when constructed.

Constructor Detail

InvalidSyntaxException

public InvalidSyntaxException(String msg, String filter)
Creates an exception of type InvalidSyntaxException.

This method creates an InvalidSyntaxException object with the specified message and the filter string which generated the exception.

Parameters: msg The message. filter The invalid filter string.

InvalidSyntaxException

public InvalidSyntaxException(String msg, String filter, Throwable cause)
Creates an exception of type InvalidSyntaxException.

This method creates an InvalidSyntaxException object with the specified message and the filter string which generated the exception.

Parameters: msg The message. filter The invalid filter string. cause The cause of this exception.

Since: 1.3

Method Detail

getCause

public Throwable getCause()
Returns the cause of this exception or null if no cause was specified when this exception was created.

Returns: The cause of this exception or null if no cause was specified.

Since: 1.3

getFilter

public String getFilter()
Returns the filter string that generated the InvalidSyntaxException object.

Returns: The invalid filter string.

See Also: BundleContext addServiceListener

initCause

public Throwable initCause(Throwable cause)
The cause of this exception can only be set when constructed.

Parameters: cause Cause of the exception.

Returns: This object.

Throws: java.lang.IllegalStateException This method will always throw an IllegalStateException since the cause of this exception can only be set when constructed.

Since: 1.3