मान लीजिए कि हमारे पास एक संरचना है जैसे:
Try
' Outer try code, that can fail with more generic conditions,
' that I know less about and might not be able to handle
Try
' Inner try code, that can fail with more specific conditions,
' that I probably know more about, and are likely to handle appropriately
Catch innerEx as Exception
' Handle the inner exception
End Try
Catch outerEx as Exception
' Handle outer exception
End Try
मैंने कुछ राय देखी है कि Try
इस तरह के घोंसले के शिकार को हतोत्साहित किया जाता है, लेकिन मुझे कोई विशेष कारण नहीं मिला।
क्या यह बुरा कोड है? यदि हां, तो क्यों?