Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
3a4f6b53
Commit
3a4f6b53
authored
13 years ago
by
Jean Chalard
Committed by
Android (Google) Code Review
13 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Error out when given an unknown argument"
parents
4c34454a
003b8cf9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/makedict/src/com/android/inputmethod/latin/DictionaryMaker.java
+5
-2
5 additions, 2 deletions
...ct/src/com/android/inputmethod/latin/DictionaryMaker.java
with
5 additions
and
2 deletions
tools/makedict/src/com/android/inputmethod/latin/DictionaryMaker.java
+
5
−
2
View file @
3a4f6b53
...
...
@@ -105,7 +105,8 @@ public class DictionaryMaker {
}
else
{
// All these options need an argument
if
(
args
.
isEmpty
())
{
throw
new
RuntimeException
(
"Option "
+
arg
+
" requires an argument"
);
throw
new
IllegalArgumentException
(
"Option "
+
arg
+
" is unknown or "
+
"requires an argument"
);
}
String
filename
=
args
.
get
(
0
);
args
.
remove
(
0
);
...
...
@@ -121,6 +122,8 @@ public class DictionaryMaker {
outputBinary
=
filename
;
}
else
if
(
OPTION_OUTPUT_XML
.
equals
(
arg
))
{
outputXml
=
filename
;
}
else
{
throw
new
IllegalArgumentException
(
"Unknown option : "
+
arg
);
}
}
}
else
{
...
...
@@ -133,7 +136,7 @@ public class DictionaryMaker {
}
else
if
(
null
==
outputBinary
)
{
outputBinary
=
arg
;
}
else
{
throw
new
Runtime
Exception
(
"Several output binary files specified"
);
throw
new
IllegalArgument
Exception
(
"Several output binary files specified"
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment