public class BundleException
extends java.lang.Exception
 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 | 
|---|---|
| static int | ACTIVATOR_ERRORThe bundle activator was in error. | 
| static int | DUPLICATE_BUNDLE_ERRORThe install or update operation failed because another already installed
 bundle has the same symbolic name and version. | 
| static int | INVALID_OPERATIONThe operation was invalid. | 
| static int | MANIFEST_ERRORThe bundle manifest was in error. | 
| static int | NATIVECODE_ERRORThe bundle could not be resolved due to an error with the
 Bundle-NativeCode header. | 
| static int | READ_ERRORThe framework received an error while reading the input stream for a
 bundle. | 
| static int | REJECTED_BY_HOOKA framework hook rejected the operation. | 
| static int | RESOLVE_ERRORThe bundle was not resolved. | 
| static int | SECURITY_ERRORThe operation failed due to insufficient permissions. | 
| static int | START_TRANSIENT_ERRORThe start transient operation failed because the start level of the
 bundle is greater than the current framework start level | 
| static int | STATECHANGE_ERRORThe operation failed to complete the requested lifecycle state change. | 
| static int | UNSPECIFIEDNo exception type is specified. | 
| static int | UNSUPPORTED_OPERATIONThe operation was unsupported. | 
| Constructor and Description | 
|---|
| BundleException(java.lang.String msg)Creates a  BundleExceptionwith the specified message. | 
| BundleException(java.lang.String msg,
               int type)Creates a  BundleExceptionwith the specified message and type. | 
| BundleException(java.lang.String msg,
               int type,
               java.lang.Throwable cause)Creates a  BundleExceptionwith the specified message, type and
 exception cause. | 
| BundleException(java.lang.String msg,
               java.lang.Throwable cause)Creates a  BundleExceptionwith the specified message and
 exception cause. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.lang.Throwable | getCause()Returns the cause of this exception or  nullif no cause was set. | 
| java.lang.Throwable | getNestedException()Returns the cause of this exception or  nullif no cause was
 specified when this exception was created. | 
| int | getType()Returns the type for this exception or  UNSPECIFIEDif the type
 was unspecified or unknown. | 
| java.lang.Throwable | initCause(java.lang.Throwable cause)Initializes the cause of this exception to the specified value. | 
public static final int UNSPECIFIED
public static final int UNSUPPORTED_OPERATION
public static final int INVALID_OPERATION
public static final int MANIFEST_ERROR
public static final int RESOLVE_ERROR
public static final int ACTIVATOR_ERROR
public static final int SECURITY_ERROR
public static final int STATECHANGE_ERROR
public static final int NATIVECODE_ERROR
public static final int DUPLICATE_BUNDLE_ERROR
Constants.FRAMEWORK_BSNVERSION, 
Constant Field Valuespublic static final int START_TRANSIENT_ERROR
public static final int READ_ERROR
public static final int REJECTED_BY_HOOK
public BundleException(java.lang.String msg,
                       java.lang.Throwable cause)
BundleException with the specified message and
 exception cause.msg - The associated message.cause - The cause of this exception.public BundleException(java.lang.String msg)
BundleException with the specified message.msg - The message.public BundleException(java.lang.String msg,
                       int type,
                       java.lang.Throwable cause)
BundleException with the specified message, type and
 exception cause.msg - The associated message.type - The type for this exception.cause - The cause of this exception.public BundleException(java.lang.String msg,
                       int type)
BundleException with the specified message and type.msg - The message.type - The type for this exception.public java.lang.Throwable getNestedException()
null if no cause was
 specified when this exception was created.
 
 
 This method predates the general purpose exception chaining mechanism.
 The getCause() method is now the preferred means of obtaining
 this information.
getCause().public java.lang.Throwable getCause()
null if no cause was set.getCause in class java.lang.Throwablenull if no cause was set.public java.lang.Throwable initCause(java.lang.Throwable cause)
initCause in class java.lang.Throwablecause - The cause of this exception.java.lang.IllegalArgumentException - If the specified cause is this
         exception.java.lang.IllegalStateException - If the cause of this exception has already
         been set.public int getType()
UNSPECIFIED if the type
 was unspecified or unknown.Copyright © OSGi Alliance (2000, 2020). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0