summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-09-21 06:12:43 -0400
committerEvan Prodromou <evan@status.net>2010-09-21 06:12:43 -0400
commitab24007f4c2f0e1290e8546893e7fa4394e367d5 (patch)
tree8aa1e5d1432f60fbd5a018c60960a298218afcb9 /scripts
parentb1802b87206fb165c2c3c4e06ba5c812e9701e02 (diff)
throw a catchable exception in getUser()
Diffstat (limited to 'scripts')
-rw-r--r--scripts/commandline.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/commandline.inc b/scripts/commandline.inc
index a29f58844..6d94a318d 100644
--- a/scripts/commandline.inc
+++ b/scripts/commandline.inc
@@ -178,6 +178,10 @@ function get_option_value($opt, $alt=null)
return null;
}
+class NoUserArgumentException extends Exception
+{
+}
+
function getUser()
{
$user = null;
@@ -195,8 +199,7 @@ function getUser()
throw new Exception("Can't find user with nickname '$nickname'");
}
} else {
- show_help();
- exit(1);
+ throw new NoUserArgumentException("No user argument specified.");
}
return $user;