Polymorphic types shouldn't be caught by value, as the warning message says. Catch them by constant reference instead.