mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve exception handling:
* Self-document the code by renaming Throw to Rethrow. * Write a message to the debug log when we throw or rethrow an exception.
This commit is contained in:
@@ -154,7 +154,7 @@ parse_Port (ParsedPort& port, Section const& section, std::ostream& log)
|
||||
{
|
||||
log << "Invalid value '" << result.first <<
|
||||
"' for key 'ip' in [" << section.name() << "]\n";
|
||||
Throw();
|
||||
Rethrow();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ parse_Port (ParsedPort& port, Section const& section, std::ostream& log)
|
||||
log <<
|
||||
"Invalid value '" << result.first << "' for key " <<
|
||||
"'port' in [" << section.name() << "]\n";
|
||||
Throw();
|
||||
Rethrow();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,7 +207,7 @@ parse_Port (ParsedPort& port, Section const& section, std::ostream& log)
|
||||
log <<
|
||||
"Invalid value '" << lim << "' for key " <<
|
||||
"'limit' in [" << section.name() << "]\n";
|
||||
Throw();
|
||||
Rethrow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user