Dear Rafael and Dev Team, I highly appreciate you effort. Thanks! for your reply.
Thank you On Wed, Feb 24, 2016 at 3:37 PM, Rafael Weingärtner < rafaelweingart...@gmail.com> wrote: > I do not know what the academic literature says about it, but when I > mentioned legacy code, I meant old and not well-designed code. It could > also mean code that uses some old version of a technology. However, in > those cases you pointed out, the technology is still the same (Java), even > though it was probably coded with Java 1.4 or 1.5, at that time there were > ways to treat those exceptions without silencing them, and if you want to > silence an exception, you should/could, at least, log it as a > warn/info/debug message. > > I find it a bad programming practice for a simple reason; if an exception > occurs within those methods, there is no easy way to know what is > happening. The flow of execution will continue (the catch silenced the > exception) and that can cause problems that the only way to find the root > cause is a debug of the whole execution flow. That makes it almost > impossible for administrators to trace those exceptions and report a > bug/problem, relying on developers to do that job. > > On Wed, Feb 24, 2016 at 1:31 AM, sangeeta lal <sangeeta.6...@gmail.com> > wrote: > > > Dear Rafael and Dev Team, > > > > Thanks for your reply. > > > > On internet I found that legacy code: *is a type of code which is used > in > > the software currently, but there are new and better technology that can > > replace it in the future. *Please let me know if my interpretation is > > correct. > > > > Also, can you please elaborate more, why it is a bad programming > practice? > > and where I can find more information about it. > > > > > > Thank You > > > > On Tue, Feb 23, 2016 at 9:17 PM, Rafael Weingärtner < > > rafaelweingart...@gmail.com> wrote: > > > > > Dear Sangeeta, > > > > > > Those examples you provided are a bad programming practice (in my > > opinion). > > > They are legacy code, and we are trying to fix them whenever we uncover > > > one. > > > > > > On Tue, Feb 23, 2016 at 11:11 AM, sangeeta lal < > sangeeta.6...@gmail.com> > > > wrote: > > > > > > > Dear Dev Team, > > > > > > > > > > > > I am Sangeeta (PhD) scholar from India. I am working in the area of > > > mining > > > > software repositories and my aim is to study logging practices of > > > > developers. I am using Apache CloudStack project for my study. > > > > I notice that when a try block consist of following three types of > > > > statements, their corresponding catch block is not logged. > > > > > > > > *Type 1 : * { > > > > org.apache.axiom.soap.SOAPEnvelope > > > resultEnv=resultContext.getEnvelope(); > > > > java.lang.Object > > > > > > > > > > > > > > object=fromOM(resultEnv.getBody().getFirstElement(),com.amazon.ec2.client.AmazonEC2Stub.DescribePlacementGroupsResponse.class,getEnvelopeNamespaces(resultEnv)); > > > > > > > > > > > > > > > > > > callback.receiveResultdescribePlacementGroups((com.amazon.ec2.client.AmazonEC2Stub.DescribePlacementGroupsResponse)object); > > > > } > > > > > > > > *Type 2:* { > > > > return > > > > > > > > > > > > > > param.getOMElement(com.amazon.ec2.CreateNetworkInterfaceResponse.MY_QNAME,org.apache.axiom.om.OMAbstractFactory.getOMFactory()); > > > > } > > > > > > > > > > > > *Type 3:* { > > > > > > > > > > > > > > > > > > isReaderMTOMAware=java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE)); > > > > } > > > > > > > > > > > > Can any of you please tell me why is it happening? > > > > > > > > Thank You So Much!! > > > > > > > > -- > > > > Regards... > > > > Sangeeta > > > > Assistant Professor > > > > CSE Department @JIIT Noida > > > > > > > > > > > > > > > > -- > > > Rafael Weingärtner > > > > > > > > > > > -- > > Regards... > > Sangeeta > > Assistant Professor > > CSE Department @JIIT Noida > > > > > > -- > Rafael Weingärtner > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida