Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Re: throwing ex...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 9 Topic 16067 of 16269
Post > Topic >>

Re: throwing exceptions on instantiation

by Roedy Green <see_website@[EMAIL PROTECTED] > May 10, 2008 at 01:03 PM

On Fri, 09 May 2008 04:06:49 GMT, thufir <hawat.thufir@[EMAIL PROTECTED]
>
wrote, quoted or indirectly quoted someone who said :

>The makeGuest is working fine, probably because the data is fine.  If the

>constructor of Guest throws a DataException, though, I wouldn't want 
>makeGuest to return a new Guest!  I'm not quite sure what it should do, 
>if not that, though...

If you do something like 

Thing thing = new Thing();

And the constructor throws an exception, thing will be unmodified
since the assigment is the last step.
-- 

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 




 9 Posts in Topic:
throwing exceptions on instantiation
thufir <hawat.thufir@[  2008-05-09 04:06:49 
Re: throwing exceptions on instantiation
Knute Johnson <nospam@  2008-05-08 22:04:19 
Re: throwing exceptions on instantiation
thufir <hawat.thufir@[  2008-05-09 09:31:30 
Re: throwing exceptions on instantiation
Knute Johnson <nospam@  2008-05-09 09:15:52 
Re: throwing exceptions on instantiation
Daniel Pitts <newsgrou  2008-05-09 07:55:17 
Re: throwing exceptions on instantiation
thufir <hawat.thufir@[  2008-05-10 07:13:22 
Re: throwing exceptions on instantiation
Lew <lew@[EMAIL PROTEC  2008-05-10 08:24:08 
Re: throwing exceptions on instantiation
Roedy Green <see_websi  2008-05-10 13:03:09 
Re: throwing exceptions on instantiation
Lew <lew@[EMAIL PROTEC  2008-05-10 09:52:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:13:49 CDT 2008.