summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/exceptions/TargetNotFoundException.java
blob: e3384b8f9e61d78f0aa3941fdd5b97f018a915c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package ftbsc.lll.exceptions;

/**
 * Thrown upon failure to find an existing method from a stub.
 */
public class TargetNotFoundException extends RuntimeException {

   /**
    * Constructs a new target not found exception for the specified method stub.
    * @param type the type of element being sought (class, method, etc.)
    * @param member the stub's name (and descriptor possibly)
    */
   public TargetNotFoundException(String type, String member) {
      super(String.format("Could not find target %s %s.", type, member));
   }

   /**
    * Constructs a new target not found exception for the specified method stub.
    * @param type the type of element being sought (class, method, etc.)
    * @param member the stub's name (and descriptor possibly)
    * @param parent the parent of the member
    */
   public TargetNotFoundException(String type, String member, String parent) {
      super(String.format("Could not find target %s %s in class %s.", type, member, parent));
   }
}