declare methods throw runtime exceptions for IDE hints
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1760784 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
03b5dc68eb
commit
91f2d5680e
@ -166,19 +166,19 @@ public enum FormulaError {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FormulaError forInt(byte type){
|
public static FormulaError forInt(byte type) throws IllegalArgumentException {
|
||||||
FormulaError err = bmap.get(type);
|
FormulaError err = bmap.get(type);
|
||||||
if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);
|
if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
public static FormulaError forInt(int type){
|
public static FormulaError forInt(int type) throws IllegalArgumentException {
|
||||||
FormulaError err = imap.get(type);
|
FormulaError err = imap.get(type);
|
||||||
if(err == null) err = bmap.get((byte)type);
|
if(err == null) err = bmap.get((byte)type);
|
||||||
if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);
|
if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FormulaError forString(String code){
|
public static FormulaError forString(String code) throws IllegalArgumentException {
|
||||||
FormulaError err = smap.get(code);
|
FormulaError err = smap.get(code);
|
||||||
if(err == null) throw new IllegalArgumentException("Unknown error code: " + code);
|
if(err == null) throw new IllegalArgumentException("Unknown error code: " + code);
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user