You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Roland Weber <ht...@dubioso.net> on 2006/03/12 17:34:41 UTC

convention for exception messages?

Hi guys,

I have just noticed that Oleg is changing some exceptions messages
I wrote in http-core, which makes me wonder whether there is a
convention. I am used to two conventions:

1. all lowercase without punctuation at end of sentence
2. Correctly capitalized and with punctuation.

For HTTP components, I've been using version 1 because it is
more informal (and saves 1 char per exception message :-).
Oleg, you are using capitalization without punctuation, which
feels somehow strange to me.

So, is there a convention to which I have to adjust in http-async?
Of course I'll stick to the current style when writing code for
http-core in the future.

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Re: convention for exception messages?

Posted by Roland Weber <ht...@dubioso.net>.
Hi Oleg,

thanks for the explanation.

> I did vandalize some of the
> exception messages you wrote originally to make them more consistent
> with the rest of HttpCore

no problem

> I do admit I have a rather unusual coding style.

So do I :-)

> I tend to use 'final'
> modifier for local variables and 

I tend to declare all methods final, unless I see a reason why anybody
should have to override them. I am still reluctant to using final for
local variables and even more so for method parameters, partly because
I have made bad experiences with the "const" modifier in C++. But I'm
already catching up on this. After all, compilers sometimes need such
hints in order to generate better code.

> like to mark instance variables with 'this.'

mine all have an underscore in their name

> I have no intention of forcing the same convention on anyone
> else, though

Neither do I. Keeping it consistent across modules should be fine.

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Re: convention for exception messages?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2006-03-12 at 17:34 +0100, Roland Weber wrote:
> Hi guys,
> 
> I have just noticed that Oleg is changing some exceptions messages
> I wrote in http-core, which makes me wonder whether there is a
> convention. I am used to two conventions:
> 
> 1. all lowercase without punctuation at end of sentence
> 2. Correctly capitalized and with punctuation.
> 
> For HTTP components, I've been using version 1 because it is
> more informal (and saves 1 char per exception message :-).
> Oleg, you are using capitalization without punctuation, which
> feels somehow strange to me.
> 
> So, is there a convention to which I have to adjust in http-async?
> Of course I'll stick to the current style when writing code for
> http-core in the future.
> 

Roland,

There's no formal convention I know of. It can be either way as long as
it is consistent across the same module. I did vandalize some of the
exception messages you wrote originally to make them more consistent
with the rest of HttpCore while tweaking some of the code in those
classes and take full responsibility for this atrocity. 

I do admit I have a rather unusual coding style. I tend to use 'final'
modifier for local variables and like to mark instance variables with
'this.' I have no intention of forcing the same convention on anyone
else, though

Cheers,

Oleg


> cheers,
>   Roland
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org