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?



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


Thanks Kevin! That should do the trick.