summaryrefslogtreecommitdiff
path: root/src/Main.cc
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2012-03-27 06:08:12 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2012-03-27 06:08:12 +0200
commit0028694f8a4f20b634d71ac04355679a442c8cdb (patch)
tree038facabe20a989d3f3b7c916df371a169ead424 /src/Main.cc
parent6e3130bab3ded0ecc802b81b423e702f65b147c5 (diff)
More code cleanup
Diffstat (limited to 'src/Main.cc')
-rw-r--r--src/Main.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Main.cc b/src/Main.cc
index d40926f..b2aa739 100644
--- a/src/Main.cc
+++ b/src/Main.cc
@@ -67,9 +67,9 @@ int Balau::Main::bootstrap(int _argc, char ** _argv) {
catch (Exit e) {
m_status = STOPPING;
Printer::log(M_ERROR, "We shouldn't have gotten an Exit exception here... exitting anyway");
- std::vector<String> trace = e.getTrace();
- for (std::vector<String>::iterator i = trace.begin(); i != trace.end(); i++)
- Printer::log(M_ERROR, "%s", i->to_charp());
+ auto trace = e.getTrace();
+ for (String & str : trace)
+ Printer::log(M_ERROR, "%s", str.to_charp());
r = e.getCode();
}
catch (RessourceException e) {
@@ -78,9 +78,9 @@ int Balau::Main::bootstrap(int _argc, char ** _argv) {
const char * details = e.getDetails();
if (details)
Printer::log(M_ERROR, " %s", details);
- std::vector<String> trace = e.getTrace();
- for (std::vector<String>::iterator i = trace.begin(); i != trace.end(); i++)
- Printer::log(M_DEBUG, "%s", i->to_charp());
+ auto trace = e.getTrace();
+ for (String & str : trace)
+ Printer::log(M_DEBUG, "%s", str.to_charp());
r = -1;
}
catch (GeneralException e) {
@@ -89,9 +89,9 @@ int Balau::Main::bootstrap(int _argc, char ** _argv) {
const char * details = e.getDetails();
if (details)
Printer::log(M_ERROR, " %s", details);
- std::vector<String> trace = e.getTrace();
- for (std::vector<String>::iterator i = trace.begin(); i != trace.end(); i++)
- Printer::log(M_DEBUG, "%s", i->to_charp());
+ auto trace = e.getTrace();
+ for (String & str : trace)
+ Printer::log(M_DEBUG, "%s", str.to_charp());
r = -1;
}
catch (...) {