
org.eclipse.osgi.signedcontent.InvalidContentException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aspectjtools Show documentation
Show all versions of aspectjtools Show documentation
Tools from the AspectJ project
/*******************************************************************************
* Copyright (c) 2005, 2012 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.osgi.signedcontent;
import java.io.IOException;
/**
* Indicates that signed content is invalid according to one of the signers.
*
* @since 3.4
* @noextend This class is not intended to be subclassed by clients.
*/
public class InvalidContentException extends IOException {
private static final long serialVersionUID = -399150159330289387L;
// TODO may want to add error codes to indicate the reason for the
// invalid/corruption error.
private final Throwable cause;
/**
* Constructs an InvalidContentException
with the specified detail
* message and cause.
*
* @param message the exception message
* @param cause the cause, may be null
*/
public InvalidContentException(String message, Throwable cause) {
super(message);
this.cause = cause;
}
/**
* Returns the cause of this exception or null
if no cause was
* specified when this exception was created.
*
* @return The cause of this exception or null
if no cause was
* created.
*/
@Override
public Throwable getCause() {
return cause;
}
/**
* The cause of this exception can only be set when constructed.
*
* @param t Cause of the exception.
* @return 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.
*/
@Override
public Throwable initCause(Throwable t) {
throw new IllegalStateException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy