function handleError(b3dmLoader, error) {
  b3dmLoader.unload();
  b3dmLoader._state = B3dmLoaderState.FAILED;
  const errorMessage = "Failed to load b3dm";
  error = b3dmLoader.getError(errorMessage, error);
  return Promise.reject(error);
}
Loads the resource.
@returns {Promise<B3dmLoader>} A promise which resolves to the loader when the resource loading is completed.
@private