This commit is contained in:
denis
2026-06-02 11:58:08 -04:00
committed by GitHub
parent 3051825098
commit e53c8d02af
16 changed files with 99 additions and 16 deletions
@@ -0,0 +1,28 @@
package de.caydenno1.xacrypto.misc;
import java.util.Arrays;
public class XACryptoException extends Exception {
private int id = (int) 0x00;
public XACryptoException(String res) {
super(res);
}
public XACryptoException(byte id){
super(String.format("0x%02X", id & 0xFF));
}
public XACryptoException(String res, byte id) {
super(res);
this.id = id & 0xFF;
}
public XACryptoException(String[] pnts, byte id){
super(String.join("|", pnts));
this.id = id & 0xFF;
}
public XACryptoException(String[] pnts, String other, byte id){
String[] data = Arrays.copyOf(pnts, pnts.length+1);
data[data.length - 1] = "REASON=".concat(other);
super(String.join("|", data));
this.id = id & 0xFF;
}
}