diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2013-07-08 11:07:27 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-07-08 11:07:27 +0200 |
commit | c5f9985dfdbf8231fc61193ca9467a01cf6af375 (patch) | |
tree | 5fe5f98f6486a6d96bebf54a74130d9860c1951f | |
parent | d42c52e86271b102cbc2fd94a99350364393e705 (diff) |
Gracefully handle the errors using argp_error instead of error.
* options.c (argp_parse_common_options): Gracefully handle the errors using
argp_error instead of error.
-rw-r--r-- | options.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -116,7 +116,7 @@ argp_parse_common_options (int key, char *arg, struct argp_state *state) case OPT_STOW: /* --stow */ err = stow_diradd (arg, ulfs_flags, &ulfs_patternlist, ulfs_priority); if (err) - error (EXIT_FAILURE, err, "stow_diradd"); + argp_error (state, "stow_diradd"); ulfs_modified = 1; ulfs_flags = ulfs_mode = ulfs_priority = 0; ulfs_match = 0; @@ -136,7 +136,7 @@ argp_parse_common_options (int key, char *arg, struct argp_state *state) else err = ulfs_register (arg, ulfs_flags, ulfs_priority); if (err) - error (EXIT_FAILURE, err, "ulfs_register"); + argp_error (state, "ulfs_register"); ulfs_modified = 1; ulfs_flags = ulfs_mode = ulfs_priority = 0; ulfs_match = 0; |