For good exceptional handling should I create all my methods in try
catch block and throw exception in the catch block with e.printstacktrace()
Exammple
public void processQueryResults(Map metaInfo, Map
entityInfo) throws WorkflowException {
try{
if(entities==null){
entities= new
ArrayList();
}
IEntityDAO entityDAO
=ObjectFinder.getEntityDAOFromBpAlias(StringUtilities.stripNamespace(metaInfo.get(IWorkflow.BUSINESS_PROCESS_ALIAS).toString()));
Entity entity=entityDAO.createNew();
Integer entityId=new
Integer(metaInfo.get(IWorkflow.ENTITY).toString());
entity.setId(entityId.intValue());
entity.fromMap(entityInfo);
entity.setMetaInfo(metaInfo);
entities.add(entity);
}catch(Exception e) {
e.printStackTrace();
throw new WorkflowException(e);
}
}
Is this good way to handle exception ?
Thanks & Regards
miro
---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.