2008-05-21 06:35:42 +02:00
|
|
|
package org.jivesoftware.smackx.jingle;
|
|
|
|
|
|
|
|
|
|
|
|
import org.jivesoftware.smack.XMPPException;
|
|
|
|
import org.jivesoftware.smackx.packet.JingleError;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A Jingle exception.
|
|
|
|
*
|
|
|
|
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
|
|
|
*/
|
|
|
|
public class JingleException extends XMPPException {
|
2012-10-26 12:47:55 +02:00
|
|
|
private static final long serialVersionUID = -1521230401958103382L;
|
|
|
|
|
|
|
|
private final JingleError error;
|
2008-05-21 06:35:42 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Default constructor.
|
|
|
|
*/
|
|
|
|
public JingleException() {
|
|
|
|
super();
|
|
|
|
error = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor with an error message.
|
|
|
|
*
|
|
|
|
* @param msg The message.
|
|
|
|
*/
|
|
|
|
public JingleException(String msg) {
|
|
|
|
super(msg);
|
|
|
|
error = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor with an error response.
|
|
|
|
*
|
|
|
|
* @param error The error message.
|
|
|
|
*/
|
|
|
|
public JingleException(JingleError error) {
|
|
|
|
super();
|
|
|
|
this.error = error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the error message.
|
|
|
|
*
|
|
|
|
* @return the error
|
|
|
|
*/
|
|
|
|
public JingleError getError() {
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
}
|