Re: To wrap or not to wrap?
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Thu, 08 May 2008 19:13:32 -0400
Aaron Fude wrote:
In my personal development efforts, I frequently wrap basic java
functionality. For example, I have a
String MyIO.urlToString(String url)
or
byte[] MIO.urlToBytes(String url)
etc. These functions catch exceptions and return null if something
goes wrong. I have other functoins that, for example, load database
queries into maps.
My gereneral questions are these. Does everybody pretty much end up
writing convenience wrappers like these for themselves?. If yes, why
aren't utilities like these commonly available as more or less
standard libraries? And if no - why not? Is it a bad idea to use these
and is it for some reason better to, e.g., always form URL's, open
connections, capture exceptions, etc.
I think it is a bad idea.
You should use the exception functionality as it is intended.
Arne
.
- Follow-Ups:
- Re: To wrap or not to wrap?
- From: Aaron Fude
- Re: To wrap or not to wrap?
- References:
- To wrap or not to wrap?
- From: Aaron Fude
- To wrap or not to wrap?
- Prev by Date: Re: Set and .equals() semantics
- Next by Date: Re: To wrap or not to wrap?
- Previous by thread: To wrap or not to wrap?
- Next by thread: Re: To wrap or not to wrap?
- Index(es):
Relevant Pages
|