aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/exceptions/MappingNotFoundException.java
blob: e943c01611d8206c3848d3232ea7a7c1b951da95 (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
27
package ftbsc.lll.exceptions;

import ftbsc.lll.processor.tools.obfuscation.ObfuscationMapper;

/**
 * Thrown upon failure to find the requested mapping within a loaded {@link ObfuscationMapper}.
 */
public class MappingNotFoundException extends RuntimeException {

   /**
    * Constructs a new mapping not found exception for the specified mapping.
    * @param mapping the relevant mapping
    */
   public MappingNotFoundException(String mapping) {
      super(String.format("Could not find mapping for %s!", mapping));
   }

   /**
    * Constructs a new mapping not found exception for the specified mapping
    * with the specified reason.
    * @param mapping the relevant mapping
    * @param reason the reason message
    */
   public MappingNotFoundException(String mapping, String reason) {
      this(mapping + ": " + reason);
   }
}