Skip to content

useGltf error boundary catchable errors #2585

@DennisSmolek

Description

@DennisSmolek

Related to pmndrs/react-three-fiber#3181

Because ErrorBoundaries are React constructs they fail to catch vanilla errors in the loader call.

  1. wrap methods in try/catch and provide a setError method
  2. For v10+ r3f setError is available on useThree which will fire the global boundary.

Im not sure of the line number handling but this already works in the new useFrame

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv11For v11 related taskswebgpuWebGPU Related issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions