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