if/else, try/catch blocks
Justin Harris
jharris at redhat.com
Mon Mar 22 21:11:57 UTC 2010
----- "Jesus M. Rodriguez" <jesusr at redhat.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> It was brought up today that some folks prefer:
>
> if (true) {
> // some code
> } else if (some_expressions) {
> // some code
> } else {
> // some code
> }
>
> to the current format of
> if (true) {
> // some code
> }
> else if (some_expressions) {
> // some code
> }
> else {
> // some code
> }
>
> Same applies to try/catch/finally blocks:
>
> try {
> // some code
> } catch (Exception e) {
> // log or rethrow
> } finally {
> // final cleanup
> }
>
> as opposed to the current format:
>
> try {
> // some code
> }
> catch (Exception e) {
> // log or rethrow
> }
> finally {
> // final cleanup
> }
>
> I've grown partial to the latter (new lined version, but was used to
> the
> former in a past job). So I'm putting this up for a vote, majority
> wins.
> Only one vote per person.
>
> 1) same line
> 2) new line
Vote for 1
>
> jesus
>
> - --
> jesus m. rodriguez | jesusr at redhat.com
> principal software engineer | irc: zeus
> red hat systems management | 919.754.4413 (w)
> rhce # 805008586930012 | 919.623.0080 (c)
> +---------------------------------------------+
> | "Those who cannot remember the past |
> | are condemned to repeat it." |
> | -- George Santayana |
> +---------------------------------------------+
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkun3KIACgkQvJZ57YntiYPtBQCeI+IfmeKwmjS/PqksdZTWrDly
> S/MAn0CAWjOlKkAhmdqXO22yHvcFv3nL
> =dVIQ
> -----END PGP SIGNATURE-----
> _______________________________________________
> candlepin mailing list
> candlepin at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/candlepin
More information about the candlepin
mailing list