Debian Codegraph @

net/sf/saxon/trans/LicenseException.java

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2018 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
6 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
8 package net.sf.saxon.trans;
9
10 /**
11 * Exception thrown when there are problems with the license file
12 */
13 public class LicenseException extends RuntimeException {
14
15 private int reason;
16
17 public static final int EXPIRED = 1;
18 public static final int INVALID = 2;
19 public static final int NOT_FOUND = 3;
20 public static final int WRONG_FEATURES = 4;
21 public static final int CANNOT_READ = 5;
22 public static final int WRONG_CONFIGURATION = 6;
23
24 public LicenseException(String message, int reason) {
25 super(message);
26 this.reason = reason;
27 }
28
29 public void setReason(int reason) {
30 this.reason = reason;
31 }
32
33 public int getReason() {
34 return reason;
35 }
36 }