A BundleException object is created by the Framework to denote an
exception condition in the lifecycle of a bundle. BundleExceptions
should not be created by bundle developers. A type code is used to identify
the exception type for future extendability.
OSGi Alliance reserves the right to extend the set of types.
This exception conforms to the general purpose exception chaining mechanism.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ACTIVATOR_ERROR
The bundle activator was in error. |
| public static final int | DUPLICATE_BUNDLE_ERROR
The install or update operation failed because another already installed bundle has the same symbolic name and version. |
| public static final int | INVALID_OPERATION
The operation was invalid. |
| public static final int | MANIFEST_ERROR
The bundle manifest was in error. |
| public static final int | NATIVECODE_ERROR
The bundle could not be resolved due to an error with the Bundle-NativeCode header. |
| public static final int | READ_ERROR
The framework received an error while reading the input stream for a bundle. |
| public static final int | REJECTED_BY_HOOK
A framework hook rejected the operation. |
| public static final int | RESOLVE_ERROR
The bundle was not resolved. |
| public static final int | SECURITY_ERROR
The operation failed due to insufficient permissions. |
| pack-priv static final long | |
| public static final int | START_TRANSIENT_ERROR
The start transient operation failed because the start level of the bundle is greater than the current framework start level |
| public static final int | STATECHANGE_ERROR
The operation failed to complete the requested lifecycle state change. |
| private final int | type
Type of bundle exception. |
| public static final int | UNSPECIFIED
No exception type is specified. |
| public static final int | UNSUPPORTED_OPERATION
The operation was unsupported. |
| Access | Constructor and Description |
|---|---|
| public | BundleException(String
The associated message. msg, Throwable The cause of this exception. cause)Creates a |
| public | |
| public | BundleException(String
The associated message. msg, int The type for this exception. type, Throwable The cause of this exception. cause)Creates a |
| public | BundleException(String
The message. msg, int The type for this exception. type)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | Returns: The cause of this exception ornull if no cause was set.Overrides java. Returns the cause of this exception or |
| public Throwable | Returns: The result of callinggetCause().Returns the cause of this exception or |
| public int | Returns: The type of this exception.Returns the type for this exception or |
| public Throwable | Returns: This exception.The cause of this exception. cause)Overrides java. Initializes the cause of this exception to the specified value. |
| ACTIVATOR_ERROR | back to summary |
|---|---|
| public static final int ACTIVATOR_ERROR The bundle activator was in error.
| |
| DUPLICATE_BUNDLE_ERROR | back to summary |
|---|---|
| public static final int DUPLICATE_BUNDLE_ERROR The install or update operation failed because another already installed bundle has the same symbolic name and version. This exception type will only occur if the framework is configured to only allow a single bundle to be installed for a given symbolic name and version.
| |
| INVALID_OPERATION | back to summary |
|---|---|
| public static final int INVALID_OPERATION The operation was invalid.
| |
| MANIFEST_ERROR | back to summary |
|---|---|
| public static final int MANIFEST_ERROR The bundle manifest was in error.
| |
| NATIVECODE_ERROR | back to summary |
|---|---|
| public static final int NATIVECODE_ERROR The bundle could not be resolved due to an error with the Bundle-NativeCode header.
| |
| READ_ERROR | back to summary |
|---|---|
| public static final int READ_ERROR The framework received an error while reading the input stream for a bundle.
| |
| REJECTED_BY_HOOK | back to summary |
|---|---|
| public static final int REJECTED_BY_HOOK A framework hook rejected the operation.
| |
| RESOLVE_ERROR | back to summary |
|---|---|
| public static final int RESOLVE_ERROR The bundle was not resolved.
| |
| SECURITY_ERROR | back to summary |
|---|---|
| public static final int SECURITY_ERROR The operation failed due to insufficient permissions.
| |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| START_TRANSIENT_ERROR | back to summary |
|---|---|
| public static final int START_TRANSIENT_ERROR The start transient operation failed because the start level of the bundle is greater than the current framework start level
| |
| STATECHANGE_ERROR | back to summary |
|---|---|
| public static final int STATECHANGE_ERROR The operation failed to complete the requested lifecycle state change.
| |
| type | back to summary |
|---|---|
| private final int type Type of bundle exception.
| |
| UNSPECIFIED | back to summary |
|---|---|
| public static final int UNSPECIFIED No exception type is specified.
| |
| UNSUPPORTED_OPERATION | back to summary |
|---|---|
| public static final int UNSUPPORTED_OPERATION The operation was unsupported. This type can be used anywhere a BundleException can be thrown.
| |
| BundleException | back to summary |
|---|---|
| public BundleException(String msg, Throwable cause) Creates a | |
| BundleException | back to summary |
|---|---|
| public BundleException(String msg) Creates a
| |
| BundleException | back to summary |
|---|---|
| public BundleException(String msg, int type, Throwable cause) Creates a | |
| BundleException | back to summary |
|---|---|
| public BundleException(String msg, int type) Creates a
| |
| getCause | back to summary |
|---|---|
| public Throwable getCause() Overrides java. Returns the cause of this exception or | |
| getNestedException | back to summary |
|---|---|
| public Throwable getNestedException() Returns the cause of this exception or
This method predates the general purpose exception chaining mechanism.
The
| |
| getType | back to summary |
|---|---|
| public int getType() Returns the type for this exception or
| |
| initCause | back to summary |
|---|---|
| public Throwable initCause(Throwable cause) Overrides java. Initializes the cause of this exception to the specified value.
| |