dcsimg
how to create gericExceptions or exception classes
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mandapati_nagu
Posted On:   Thursday, April 21, 2005 09:28 PM

iam having nearly 60 programs thos java programs having somany exceptions but those r SystemExceptions and Application Exception . How to write code for Generic Exception classes for this.
This Generic can be using for all those 60progs.


Please use html tags to format code blocks.

Re: how to create gericExceptions or exception classes

Posted By:   Mahesh_Patro  
Posted On:   Monday, April 25, 2005 11:16 PM


The best practice is to create individual sub-class of ApplicationExcetpion and every exception class should contain a number which a property file can be maintained for display message which work for i18n.




If you dont want to create multiple Exception class then then a workaround can be like every exception you create pass a ID (int/long data typed). And same a property file can managed to get message.




Hope my answer will help you.
Mahesh P.

About | Sitemap | Contact