sp_try_brace
Add or remove space between try and { if on the same line.
Possible values are ignore, add, remove and force. Default ignore.
Examples
add
Before:
try{
std::cout << "Throwing an integer exception...\n";
throw 42;
} catch (int i) {
std::cout << " the integer exception was caught, with value: " << i << '\n';
}
After:
try {
std::cout << "Throwing an integer exception...\n";
throw 42;
} catch (int i) {
std::cout << " the integer exception was caught, with value: " << i << '\n';
}
remove
Before:
try {
std::cout << "Throwing an integer exception...\n";
throw 42;
} catch (int i) {
std::cout << " the integer exception was caught, with value: " << i << '\n';
}
After:
try{
std::cout << "Throwing an integer exception...\n";
throw 42;
} catch (int i) {
std::cout << " the integer exception was caught, with value: " << i << '\n';
}
See also
- sp_catch_brace - Add or remove space before the
{of acatchstatement, if the{andcatchare on the same line, as incatch (decl) <here> {. - sp_finally_brace - Add or remove space between
finallyand{if on the same line. - sp_brace_finally - Add or remove space between
{andfinallyif on the same line.