-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
If you give sceneFilename a URL that is no longer available then the Model generates and error and I am able to catch that error in the onModelError event. While I am notified of the error there is no way to mark it is handled. The error makes it back to the page and the browser shows afull page unhandled exception error. Is there a feature that I'm missing, a needed feature, or should I be doing something on the page to catch this somehow? Note that model.errorMessage is also always null in the handler. I think the fix should be to pass another parameter allowing the handler to mark it as handled.
const ModelWithProgress: FC<ScaledModelWithProgressType> = (props) => {
function onModelError(model: ILoadedModel): void {
console.warn(model.errorMessage) // errorMessage is always undefined and no way to dismiss the error**
}
return (
<SceneLoaderContextProvider>
<Suspense
fallback={
<ProgressFallback
progressBarColor={props.progressBarColor}
rotation={props.progressRotation ?? props.modelRotation}
center={props.center}
scaleTo={1}
/>
}
>
<Model
name="model"
reportProgress
position={props.center}
rootUrl={props.rootUrl}
sceneFilename={props.sceneFilename}
onModelError={onModelError}
rotation={props.modelRotation}
onModelLoaded={props.onModelLoaded}
/>
</Suspense>
</SceneLoaderContextProvider>
)
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels