Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) OSGi Alliance (2005, 2010). All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.osgi.service.application;

This exception is used to indicate problems related to application lifecycle management. ApplicationException object is created by the Application Admin to denote an exception condition in the lifecycle of an application. ApplicationExceptions should not be created by developers.
ApplicationExceptions are associated with an error code. This code describes the type of problem reported in this exception. The possible codes are:

Version:
$Id: be377d8ecd052974b3c5952c95af5c3df7334759 $
 
 public class ApplicationException extends Exception {
 	private static final long serialVersionUID = -7173190453622508207L;
 	private final int errorCode;

The application couldn't be launched because it is locked.
 
 	public static final int APPLICATION_LOCKED	= 0x01;

The application is not in launchable state, it's ApplicationDescriptor.APPLICATION_LAUNCHABLE attribute is false.
 
 	public static final int APPLICATION_NOT_LAUNCHABLE = 0x02;

An exception was thrown by the application or the corresponding container during launch. The exception is available from getCause().
 
 	public static final int APPLICATION_INTERNAL_ERROR = 0x03;
    
    
The application schedule could not be created due to some internal error (for example, the schedule information couldn't be saved due to some storage error).
 
     public static final int APPLICATION_SCHEDULING_FAILED = 0x04;
    
    
The application scheduling failed because the specified identifier is already in use.
 
     public static final int APPLICATION_DUPLICATE_SCHEDULE_ID = 0x05;

The exit value is not available for an application instance because the instance has not terminated.

Since:
1.1
 
     public static final int APPLICATION_EXITVALUE_NOT_AVAILABLE = 0x06;

One of the specified startup arguments is invalid, for example its type is not permitted.

Since:
1.1
 
     public static final int APPLICATION_INVALID_STARTUP_ARGUMENT = 0x07;

Creates an ApplicationException with the specified error code.

Parameters:
errorCode The code of the error
	public ApplicationException(int errorCode) {
		super();
		this. = errorCode;
	}

Creates a ApplicationException that wraps another exception.

Parameters:
errorCode The code of the error
cause The cause of this exception.
	public ApplicationException(int errorCodeThrowable cause) {
		super(cause);
		this. = errorCode;
	}

Creates an ApplicationException with the specified error code.

Parameters:
errorCode The code of the error
message The associated message
	public ApplicationException(int errorCodeString message) {
		super(message);
		this. = errorCode;
	}

Creates a ApplicationException that wraps another exception.

Parameters:
errorCode The code of the error
message The associated message.
cause The cause of this exception.
	public ApplicationException(int errorCodeString messageThrowable cause) {
		super(messagecause);
		this. = errorCode;
	}

Returns the cause of this exception or null if no cause was set.

Returns:
The cause of this exception or null if no cause was set.
	public Throwable getCause() {
		return super.getCause();
	}

Returns the error code associated with this exception.

Returns:
The error code of this exception.
	public int getErrorCode() {
		return ;
	}
New to GrepCode? Check out our FAQ X