Re: How to handle exceptions in constructor?



Thanks Thomas,


Thomas G. Marshall wrote:
>Thomas G. Marshall coughed up:
>> George George via JavaKB.com coughed up:
>>> Hello everyone,
>[quoted text clipped - 22 lines]
>> already part of the java.lang.RunTimeException tree, and rethrow it
>> as one of your own.
>
>I am hysterically unclear here, sorry.
>
>What I mean to say is that there are odd cases where you may simply wish to
>roll your own exception for the /sole/ reason to make the callers /not/ have
>to use a try/catch.
>
>If this is the only reason you do it, then it is called *Bad Design*, but
>I've seen it before.
>
>I should have labeled this has #2, and listed the second item below as #1.
>
>This is a mess of a message, and I sincerely apologize.
>
>> This is because RunTimeException and subclasses
>> do not require a throws clause in the function definition, and you
>> may really desire that your function not require this.
>
>So that your users do not have to use try/catch.
>
>> In general, I
>> would suggest making at least /some/ of your exceptions extend
>[quoted text clipped - 7 lines]
>>
>> ...[rip]...
>

Never mind. Your replies are very helpful and you are a warm-hearted expert. :
-)


regards,
George


--
Message posted via http://www.javakb.com
.



Relevant Pages

  • Re: Complete Peerage Additions/Corrections: Margaret Bourgchier, Lady Bryan
    ... George died before 15 January 1514/1515, and Thomas who died 30 October 1517. ... Strange that they date this 1500-1515, didn't "Edmund Grey, Lord Grey ... To unsubscribe from the list, please send an email to GEN-MEDIEVAL-request@xxxxxxxxxxxx with the word 'unsubscribe' without the quotes in the subject and the body of the message ...
    (soc.genealogy.medieval)
  • 2006 Topps inserts for sale
    ... George Clymer $1.50 ... John Hancock $1.50 ... Thomas Heyward Jr. ... #OG16 - Albert Pujols $3.00 ...
    (rec.collecting.sport.baseball)
  • Will of Thomas St George of Hatley St George, Cambs +1539/40
    ... I have not come across a published version of the will of Thomas St ... George of Hatley St George, so present this so that it is available on ... March 10 1486 - grant of wardship of the heir). ...
    (soc.genealogy.medieval)
  • Re: Kernel Realtime Capabilities
    ... "Thomas H. George" wrote: ... > I am trying to get Jackstart working and get a message "cannot get ... > Probably running under kernel with capabilities disabled, ...
    (Debian-User)
  • Re: Need Camcorder Firewire Help
    ... On Fri, 2004-12-31 at 14:02 -0500, Thomas H. George wrote: ... > I have tried running dvgrab but it does not find the carmera even though ...
    (Debian-User)