We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7fe8692 + 6f875c9 commit ff7eccaCopy full SHA for ff7ecca
src/librustdoc/lib.rs
@@ -1,4 +1,4 @@
1
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2
// file at the top-level directory of this distribution and at
3
// http://rust-lang.org/COPYRIGHT.
4
//
@@ -109,7 +109,13 @@ pub fn usage(argv0: &str) {
109
}
110
111
pub fn main_args(args: &[~str]) -> int {
112
- let matches = groups::getopts(args.tail(), opts()).unwrap();
+ let matches = match groups::getopts(args.tail(), opts()) {
113
+ Ok(m) => m,
114
+ Err(err) => {
115
+ println(err.to_err_msg());
116
+ return 1;
117
+ }
118
+ };
119
if matches.opt_present("h") || matches.opt_present("help") {
120
usage(args[0]);
121
return 0;
0 commit comments