Fixes #8353. Adds a catch block in resolveWith so that the finally block gets execute...