aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-19 20:26:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-19 20:26:26 +0000
commit6e0ef486a1f4b7e0994af7047b3006288b52479e (patch)
tree7aaca9dc8d32e533652afc77790259dc6060c287
parentb3bee5ca170f676e47932700e230441374c79b48 (diff)
downloadpaludis-6e0ef486a1f4b7e0994af7047b3006288b52479e.tar.gz
paludis-6e0ef486a1f4b7e0994af7047b3006288b52479e.tar.xz
Display a nicer error on commandline screwups
-rw-r--r--src/paludis.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/paludis.cc b/src/paludis.cc
index c9f210d..f517596 100644
--- a/src/paludis.cc
+++ b/src/paludis.cc
@@ -119,6 +119,12 @@ main(int argc, char *argv[])
return EXIT_SUCCESS;
}
+ catch (const paludis::args::ArgsError & e)
+ {
+ cerr << "Usage error: " << e.message() << endl;
+ cerr << "Try " << argv[0] << " --help" << endl;
+ return EXIT_FAILURE;
+ }
catch (const DoHelp & h)
{
if (h.message.empty())