summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-30 11:22:08 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:34 -0400
commit21af83013f3b1bae511a61b9e27224ab3de235c1 (patch)
treebf0eea45f33e7e269220adc6ce37815f7bc14a3f /src/main.cc
parent3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba (diff)
downloadledger-21af83013f3b1bae511a61b9e27224ab3de235c1.tar.gz
ledger-21af83013f3b1bae511a61b9e27224ab3de235c1.tar.bz2
ledger-21af83013f3b1bae511a61b9e27224ab3de235c1.zip
Did more work on the utility code.
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cc b/src/main.cc
index eb00bfb9..506d17bb 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -168,7 +168,7 @@ static int read_and_report(report_t * report, int argc, char * argv[],
command.reset(def->functor_obj());
if (! command.get())
- throw_(exception, string("Unrecognized command '") + verb + "'");
+ throw_(std::logic_error, string("Unrecognized command '") + verb + "'");
}
// Parse the initialization file, which can only be textual; then
@@ -201,11 +201,11 @@ static int read_and_report(report_t * report, int argc, char * argv[],
else if (! report->pager.empty()) {
status = pipe(pfd);
if (status == -1)
- throw_(exception, "Failed to create pipe");
+ throw_(std::logic_error, "Failed to create pipe");
status = fork();
if (status < 0) {
- throw_(exception, "Failed to fork child process");
+ throw_(std::logic_error, "Failed to fork child process");
}
else if (status == 0) { // child
const char *arg0;
@@ -378,7 +378,7 @@ static int read_and_report(report_t * report, int argc, char * argv[],
// Wait for child to finish
wait(&status);
if (status & 0xffff != 0)
- throw_(exception, "Something went wrong in the pager");
+ throw_(std::logic_error, "Something went wrong in the pager");
}
#endif