[Ide] Fix error cleanup issue

When there is an unexpected exception building a project the object source
(the solution) was not set, so the error was not cleared when closing
the solution.

Fixes bug #20687 - The error message should be cleared when we close a solution