Skip to content

GameObjectExport SaveToFileAndDispose does not catch exceptions - expected? #28

@andypoly

Description

@andypoly

Describe the bug
If I run (GameObjectExport).SaveToFileAndDispose I need to wrap it in try catch statements to catch any errors such as "Access to the path "xxx" is denied" (which can occur in GltfWriter->SaveToFileAndDispose on "var outStream = new FileStream(path, FileMode.Create);" for example)

Not sure if this is expected or the code should catch these itself?!
The export example does not catch such exceptions so it seems wrong: https://docs.unity3d.com/Packages/com.unity.cloud.gltfast@6.10/manual/ExportRuntime.html

To Reproduce
Try to export a gltf file to a path with access denied

Expected behavior
catch exceptions in API?

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • glTFast version
    Latest 6.10
  • Unity Editor version [e.g. 2021.2.1f1]
    NA 2022 LTS
  • Render Pipeline and version [e.g. Universal Render Pipeline 12.0]
    NA
  • Platform: [e.g. Editor, Windows Player, iOS]
    Editor

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions