package baf.sci;

public class ResourceNotFoundException extends Exception {
  int restype, resnum;
  String reason;
  public ResourceNotFoundException(int restype, int resnum, String reason) {
    this.restype = restype;
    this.resnum = resnum;
    this.reason = reason;
  }

  public ResourceNotFoundException(int restype, int resnum) {
    this(restype, resnum, null);
  }

  public String getMessage() {
    String s =  Resource.typenames[restype] + "." + resnum;
    if (reason != null) s = s + ": " + reason;
    return s;
  }
}
