Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Diffrent Excpetion thrown by Data class constructor & methods

 
ShankarS
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
The Data class constructor alone throws IOEXception, but all other public methods throws DatabaseException. Can we make it throw DatabaseException?
How are you guys handling it?
Can we make both the constructors of Data class throw DatabaseException as all other public method does?
Thanx. in Adavance,
Shankar S
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Welcome to Javaranch. We follow certain conventions with respect to the User name as given in the document here .
Your user name does not follow these conventions. Please re-register with a name following these conventions.
Thanks.
 
ShankarS
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My full name is Shankar Shanmugam. "Shankar S" is aready used by some one else.
Thanx,
Shankar S
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Go ahead and use your full name Shankar Shanmugam. Shankar S is also not a valid user name as per the Javaranch name Conventions.
Please comply with this small request.
Thanks.

------------------

Mahindrakar
IBM Application Server Forum Moderator
Consultant - Zensar Technologies.
SCJP2, SCJD2 & SCJEA (Part I)
 
ShankarS
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I guess, i have to drop this user name & create a new one.
Is it right?
BTW, It seems no one is replying for both of my posts, yet.
Why don't you spend some time for my questions?
Thanx,
Shankar S
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess, i have to drop this user name & create a new one.
Is it right?

Yes that is absolutely right

BTW, It seems no one is replying for both of my posts, yet.
Why don't you spend some time for my questions?

I would like to but the fact is that I am really busy with a project with nokia and cannot help you now.
Hope someone does help you out else i will do it when i am free tomorrow.
Bye and hope to see you with the new user id.
 
harcharan kanwal
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i like to see some comments on this question.
thanks
kanwal
 
morph wang
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ShankarS:
Hi all,
The Data class constructor alone throws IOEXception, but all other public methods throws DatabaseException. Can we make it throw DatabaseException?
How are you guys handling it?
Can we make both the constructors of Data class throw DatabaseException as all other public method does?
Thanx. in Adavance,
Shankar S

I suppose we should NOT make Data class(both constructors and other methods) throws IOException or any other JDK-level exception.
Cheers,
morph
[This message has been edited by morph wang (edited August 29, 2001).]
 
harcharan kanwal
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by morph wang:
I suppose we should NOT make Data class(both constructors and other methods) throws IOException or any other [b]JDK-level exception.
Cheers,
morph
[This message has been edited by morph wang (edited August 29, 2001).][/B]

yes, i have made signature of all of the mehtods in Data class throwing DatabaseException.In most of the methods in the Data class ,there is a possibility of wide variety of exceptions have been thrown.So in a catch block , i am rethrowing the DatabaseException with a message ,as i notice some of the methods in the Data class were imlemented the same way. Could you make more comments .
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic