summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-15 14:07:31 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:35:34 -0400
commitc6d896f7353e8b6c260ad1689d25d734d9ceb298 (patch)
treeb9be22adc0cdba2b89e40230f6fb325cc646546b /main.cc
parentdd6cbe709681798e597ead58e91f24eca3672e61 (diff)
downloadfork-ledger-c6d896f7353e8b6c260ad1689d25d734d9ceb298.tar.gz
fork-ledger-c6d896f7353e8b6c260ad1689d25d734d9ceb298.tar.bz2
fork-ledger-c6d896f7353e8b6c260ad1689d25d734d9ceb298.zip
make distcheck now works.
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/main.cc b/main.cc
index b425598f..b8e25813 100644
--- a/main.cc
+++ b/main.cc
@@ -410,10 +410,10 @@ int main(int argc, char * argv[], char * envp[])
try {
std::ios::sync_with_stdio(false);
- ledger::tracing_active = true;
-
#if DEBUG_LEVEL < BETA
ledger::do_cleanup = false;
+#else
+ ledger::tracing_active = true;
#endif
TRACE_PUSH(main, "Ledger starting");
@@ -443,11 +443,12 @@ int main(int argc, char * argv[], char * envp[])
TRACE_POP(main, "Ledger done");
+#if DEBUG_LEVEL >= BETA
DEBUG_IF("ledger.trace.memory") {
report_memory(std::cout);
}
-
ledger::tracing_active = false;
+#endif
return status;
}
@@ -460,7 +461,9 @@ int main(int argc, char * argv[], char * envp[])
err->reveal_context(std::cerr, "Error");
std::cerr << err->what() << std::endl;
delete err;
+#if DEBUG_LEVEL >= BETA
ledger::tracing_active = false;
+#endif
return 1;
}
catch (fatal * err) {
@@ -472,17 +475,23 @@ int main(int argc, char * argv[], char * envp[])
err->reveal_context(std::cerr, "Fatal");
std::cerr << err->what() << std::endl;
delete err;
+#if DEBUG_LEVEL >= BETA
ledger::tracing_active = false;
+#endif
return 1;
}
catch (const std::exception& err) {
std::cout.flush();
std::cerr << "Error: " << err.what() << std::endl;
+#if DEBUG_LEVEL >= BETA
ledger::tracing_active = false;
+#endif
return 1;
}
catch (int status) {
+#if DEBUG_LEVEL >= BETA
ledger::tracing_active = false;
+#endif
return status;
}
}