sp_catch_brace
Add or remove space before the {
of a catch
statement, if the {
and catch
are on the same line, as in catch (decl) <here> {
.
Possible values are ignore, add, remove and force. Default ignore.
Examples
add
Code 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';
}
Code 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
Code 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';
}
Code 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_paren: Add or remove space between
catch
and(
incatch (something) { }
. - sp_catch_brace - Add or remove space before the
{
of acatch
statement, if the{
andcatch
are on the same line, as incatch (decl) <here> {
. - sp_oc_catch_brace - (OC) Add or remove space before the
{
of a@catch
statement, if the{
and@catch
are on the same line, as in@catch (decl) <here> {
. If set to ignore,sp_catch_brace
is used.