DS-Lab / src / main / java / dslab / routing / AddressResolutionException.java
AddressResolutionException.java
Raw
package dslab.routing;

import dslab.protocol.ProtocolException;

public class AddressResolutionException extends ProtocolException {

    public AddressResolutionException(Address address) {
        super("The address " + address + " could not be resolved");
    }

    public AddressResolutionException(Domain badDomain) {
        this.setMessage("The domain '" + badDomain + "' could not be resolved");
    }

    public AddressResolutionException(String message) {
        super(message);
    }


    @Override
    public String getCode() {
        return "unknown"; //not informative, but required by the spec
    }
}