Catch errors during request to an imagery provider

Is it possible to catch errors that are thrown during a request in an imagery provider?
For example, if I try to create a BingMapsImageryProvider with a malformed url I get an error during the request. Is it possible to trap that error in the application level?

Thanks

Hi,

Yes, you should subscribe to the errorEvent on the imagery provider:

http://cesiumjs.org/Cesium/Build/Documentation/BingMapsImageryProvider.html?classFilter=bingmaps#errorEvent

Kevin

Thanks Kevin! That should do the trick.