package org.javarosa.xpath;

import org.javarosa.core.model.instance.TreeReference;

/**
 * An exception indicating either that:
 * a) An instance is declared, but doesn't actually have any data in it
 * b) An instance was required to be present to evaluate a ref, but was not
 */
public class XPathMissingInstanceException extends XPathException {
    String instanceName;
    TreeReference ref;

    public XPathMissingInstanceException(String instanceName, String message) {
        super(message);
        this.instanceName = instanceName;
    }

    public XPathMissingInstanceException(TreeReference refThatNeededInstance) {
        super("No instance was found with which to resolve reference: " + refThatNeededInstance);
        this.ref = refThatNeededInstance;
    }


}

@@ -82,473 +82,758 @@
 e;%0A%0A
-/**%0A * An exception indicating either that:%0A * a) An instance is declared, but doesn't actually have any data in it%0A * b) An instance was required to be present to evaluate a ref, but was not%0A */%0Apublic class XPathMissingInstanceException extends XPathException %7B%0A    String instanceName;%0A    TreeReference ref;%0A%0A    public XPathMissingInstanceException(String instanceName, String message) %7B%0A        super(message);%0A        this.instanceName = instanceName;%0A    %7D%0A
+public class XPathMissingInstanceException extends XPathException %7B%0A    String instanceName;%0A    TreeReference ref;%0A%0A    /**%0A     * Indicates that an instance is declared, but doesn't actually have any data in it%0A     * @param instanceName - the name of the empty instance%0A     * @param message%0A     */%0A    public XPathMissingInstanceException(String instanceName, String message) %7B%0A        super(message);%0A        this.instanceName = instanceName;%0A    %7D%0A%0A    /**%0A     * Indicates that an instance was required to be present to evaluate a ref, but could not be%0A     * found at all%0A     * @param refThatNeededInstance - the ref that we were attempting to resolve, but could not%0A     *                              because no instance was found%0A     */
 %0A   

document constructors instead of class