diff options
author | 2013-12-15 23:21:16 -0800 | |
---|---|---|
committer | 2013-12-15 23:21:16 -0800 | |
commit | 0c39b13cf050f9505768915895199ecf2333b5a9 (patch) | |
tree | 3fa85fc1ffb08a10c51d877f3b9975ea7af390ec /java/src/com/android/inputmethod/latin | |
parent | 92a4162ea70b2eb4b11e3fdfb6e2e3e71ff36c1d (diff) | |
parent | 5590e9d04048483fbd397c36f0cc65cfdd10bb24 (diff) | |
download | latinime-0c39b13cf050f9505768915895199ecf2333b5a9.tar.gz latinime-0c39b13cf050f9505768915895199ecf2333b5a9.tar.xz latinime-0c39b13cf050f9505768915895199ecf2333b5a9.zip |
am 5590e9d0: Merge "Make the bad header a checked exception and fix dicttool test"
* commit '5590e9d04048483fbd397c36f0cc65cfdd10bb24':
Make the bad header a checked exception and fix dicttool test
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/FormatSpec.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java index 2f6f194aa..af54805f7 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java +++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java @@ -351,18 +351,19 @@ public final class FormatSpec { public static final String DICTIONARY_ID_ATTRIBUTE = "dictionary"; private static final String DICTIONARY_DESCRIPTION_ATTRIBUTE = "description"; public FileHeader(final int headerSize, final DictionaryOptions dictionaryOptions, - final FormatOptions formatOptions) { + final FormatOptions formatOptions) throws UnsupportedFormatException { mDictionaryOptions = dictionaryOptions; mFormatOptions = formatOptions; mBodyOffset = formatOptions.mVersion < VERSION4 ? headerSize : 0; if (null == getLocaleString()) { - throw new RuntimeException("Cannot create a FileHeader without a locale"); + throw new UnsupportedFormatException("Cannot create a FileHeader without a locale"); } if (null == getVersion()) { - throw new RuntimeException("Cannot create a FileHeader without a version"); + throw new UnsupportedFormatException( + "Cannot create a FileHeader without a version"); } if (null == getId()) { - throw new RuntimeException("Cannot create a FileHeader without an ID"); + throw new UnsupportedFormatException("Cannot create a FileHeader without an ID"); } } |