class ServerDialbackErrorException extends Exception
{
    private final String from;
    private final String to;
    private final PacketError error;

    public ServerDialbackErrorException(String from, String to, PacketError error)
    {
        super();
        this.from = from;
        this.to = to;
        this.error = error;
    }

    public ServerDialbackErrorException(String from, String to, PacketError error, Throwable e)
    {
        super(e);
        this.from = from;
        this.to = to;
        this.error = error;
    }

    public String getFrom()
    {
        return from;
    }

    public String getTo()
    {
        return to;
    }

    public PacketError getError()
    {
        return error;
    }

    public Element toXML()
    {<FILL_FUNCTION_BODY>}
}

        final Namespace ns = Namespace.get("db", "jabber:server:dialback");
        final Document outbound = DocumentHelper.createDocument();
        final Element root = outbound.addElement("root");
        root.add(ns);
        final Element result = root.addElement(QName.get("result", ns));
        result.addAttribute("from", from);
        result.addAttribute("to", to);
        result.addAttribute("type", "error");
        result.add(error.getElement());

        return result;
    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID