diff options
author | Javen O'Neal <onealj@apache.org> | 2016-09-14 21:32:34 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-09-14 21:32:34 +0000 |
commit | 02405383704e85bf7bfa2b1d95e6b6121f27c1d6 (patch) | |
tree | 7a4d6c215dfec1e0760458cf4f8dd8bfa23269a7 | |
parent | c3586917afa59d0f5ce458866e777b5ff21816c4 (diff) | |
download | poi-02405383704e85bf7bfa2b1d95e6b6121f27c1d6.tar.gz poi-02405383704e85bf7bfa2b1d95e6b6121f27c1d6.zip |
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
-rw-r--r-- | src/java/org/apache/poi/ss/usermodel/FormulaError.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/poi/ss/usermodel/FormulaError.java b/src/java/org/apache/poi/ss/usermodel/FormulaError.java index 583ca06d9c..fa102299e8 100644 --- a/src/java/org/apache/poi/ss/usermodel/FormulaError.java +++ b/src/java/org/apache/poi/ss/usermodel/FormulaError.java @@ -166,19 +166,19 @@ public enum FormulaError { return false; } - public static FormulaError forInt(byte type){ + public static FormulaError forInt(byte type) throws IllegalArgumentException { FormulaError err = bmap.get(type); if(err == null) throw new IllegalArgumentException("Unknown error type: " + type); return err; } - public static FormulaError forInt(int type){ + public static FormulaError forInt(int type) throws IllegalArgumentException { FormulaError err = imap.get(type); if(err == null) err = bmap.get((byte)type); if(err == null) throw new IllegalArgumentException("Unknown error type: " + type); return err; } - public static FormulaError forString(String code){ + public static FormulaError forString(String code) throws IllegalArgumentException { FormulaError err = smap.get(code); if(err == null) throw new IllegalArgumentException("Unknown error code: " + code); return err; |