mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00

Fix #372 - Improper indentation after single-line catch merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
22 lines
336 B
D
22 lines
336 B
D
void main(string[] args)
|
|
{
|
|
// Test with catch
|
|
if (args.length > 1)
|
|
try
|
|
doSomeStuff();
|
|
catch (Exception error)
|
|
ohNoSomeErrorHappened();
|
|
else
|
|
thatsNotHowYouUseThisProgram();
|
|
|
|
// Test with finally
|
|
if (args.length > 2)
|
|
try
|
|
doOtherStuff();
|
|
catch (Exception error)
|
|
ohNoSomeErrorHappened();
|
|
finally
|
|
doSomeCleanup();
|
|
else
|
|
dontDoOtherStuff();
|
|
}
|