Skip to content

C++ code should not throw its own exceptions #212

Open
@scotts

Description

@scotts

🐛 Describe the bug

Currently, the C++ VideoDecoder code will throw normal C++ exceptions such as throw std::runtime_exception(). This has caused some problems with how PyTorch handles custom C++ ops, resulting in segfaults. We should exclusively use PyTorch macros (TORCH_CHECK(), C10_THROW_ERROR(), etc) to make sure our C++ error handling correctly propagates to Python.

Versions

All versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions