Shortcuts

Struct WorkerException

Inheritance Relationships

Base Type

  • public std::exception

Struct Documentation

struct WorkerException : public std::exception

An exception thrown when a DataLoader’s worker thread throws an exception, which is caught.

A WorkerException stores an exception_ptr to the original exception thrown in the worker thread.

Public Functions

inline explicit WorkerException(std::exception_ptr original)

Constructs a WorkerException from an exception_ptr.

inline const char *what() const noexcept override

Public Members

std::exception_ptr original_exception

The original exception thrown in the worker thread.

std::string message

This exception’s message (not the original exception’s message).

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources