Fixes microsoft/monaco-editor#2382
Fixes microsoft/monaco-editor#2382

Unhandled rejected promises are logged by default to the browser console. In the monaco editor case, we cannot register the global unhandled error handler and filter out cancellation errors because we cannot assume we own the entire page. So the strategy (used also in all other places that ship with the standalone editor and cause cancellation errors) is to just "handle" the rejected promise locally by adding an onerror handler to the promise.

Microsoft/vscode,eamodio/vscode,microsoft/vscode,Microsoft/vscode,microsoft/vscode,Microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,microsoft/vscode,eamodio/vscode,Microsoft/vscode,Microsoft/vscode,Microsoft/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,eamodio/vscode,Microsoft/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,eamodio/vscode,Microsoft/vscode,Microsoft/vscode,eamodio/vscode,Microsoft/vscode,microsoft/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode