This has to be one of the more humorous examples I've seen in a while. The anonymous submitter discovered it while trying to find the source of a rather peculiar bug. Apparently, the exception information wasn't providing enough information about the source of the error. I can't say I'm too surprised ...
try { datReadr = dataCmd.ExecuteReader(); } catch (Exception e) { if (e.GetType().Equals(typeof(DataNotFoundException))) { try { throw e; } catch (Exception e2) { log.error(e2); throw new ManagedException(e.GetType().Name); } } else { throw new DataNotFoundException("Exception while importing operational data."); } }
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!