fcl/exceptions/TypeMismatched.java
2021-06-25 13:57:34 +02:00

21 lines
638 B
Java

package com.vectron.fcl.exceptions;
import com.vectron.fcl.types.Obj;
public class TypeMismatched extends FclException {
public TypeMismatched(String operator, Obj a, Obj b) {
super(String.format("Unsupported types for %s: %s and %s", operator, a, b));
}
public TypeMismatched(String operator, Obj a) {
super(String.format("Unsupported types for %s: %s", operator, a));
}
public TypeMismatched(Obj obj, String type) {
super(obj + " (" + obj.getClass().getSimpleName() + ") is not convertible to " + type);
}
public TypeMismatched(String message) {
super(message);
}
}