// ProtocolException.java
// $Id: ProtocolException.java,v 1.3 2013/10/18 13:42:26 ylafon Exp $
// (c) COPYRIGHT MIT and INRIA, 1996.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.tools.resources;
public class ProtocolException extends Exception {
private static final long serialVersionUID = -1184486177417590941L;
String msg = null;
ReplyInterface error = null;
public ProtocolException(String msg) {
super(msg);
this.error = null;
}
public ProtocolException(String msg, ReplyInterface error) {
super(msg);
this.error = error;
}
public ProtocolException(ReplyInterface error) {
super((String) null);
this.error = error;
}
/**
* Was a reply provided with the exception ?
*
* @return True if a reply is available.
*/
public boolean hasReply() {
return error != null;
}
/**
* Get this exception reply.
*
* @return The reply to send back to requesting process.
*/
public ReplyInterface getReply() {
return error;
}
}
Webmaster