chore: use explicit `any` type for untyped catch variables.
chore: use explicit `any` type for untyped catch variables.

This is pre-work to enable a new TypeScript flag `--useUnknownInCatchVariables` that switches the default type of catch variables from any to unknown. This change preserves the old behavior.

PiperOrigin-RevId: 417463757

material-components/material-components-web,material-components/material-components-web,material-components/material-components-web