No, they're not invalid code, they're ENTERPRISE CODE!

You might think writing a function to handle exception handling only exists as a joke but I have actually seen such nonsense (and much more) on at least one of my publicly listed clients’ systems.