vmware-tanzu / tanzu-toolkit-for-visual-studio

Apache License 2.0
10 stars 3 forks source link

Catch exceptions around IOC container services #128

Open andrew-woosnam opened 3 years ago

andrew-woosnam commented 3 years ago

If required services are missing, things can go wrong with our extension that might not necessarily throw exceptions (e.g. not registering a view model can make the view look weird).

Maybe let's try to make exceptions explicit here (e.g. in ctors that use getRequiredService) & catch them to throw up a dialog instead of rendering incomplete windows. (maybe add try/catch around InstantiateToolWindow in the package.cs file?)

andrew-woosnam commented 2 years ago

Partially completed (thought it would fix a VS crashing bug related to rending the login view in VS 2019 & started implementing before discovering a different way to prevent a full VS crash)