• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Indenting throws clause

 
Sam Codean
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
One simple question, how do we indent the throws clause if we are wrapping the line?
I have seen that the DB interface has it wrapped without any indentation below the public like




where as, i thought as per standards it should be


Please can someone tell how did they do the indentations?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Sam]: I have seen that the DB interface has it wrapped without any indentation below the public like

If you mean the interface that they give you in the assignment, mine had appallingly bad formatting, with no indentation whatsoever. I would disregard it completely as far as formatting is concerned (though obviously you still need to implement it correctly). I can't see any justification for not indenting the throws. Well, I suppose you could say you're "aligning the new line with the beginning of the expression at the same level on the previous line." But, ugh, no, that just looks wrong - and more importantly, confusing - to me. I would just indent it 8 spaces.
 
Leszek Zajac
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did it like this:


4 spaces indentation and an empty line after throws.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic