# tbb_exception

## Summary

Exception that can be moved to another thread.

## Syntax

    class tbb_exception;

## Header

    #include "tbb/tbb_exception.h"

## Description

In a parallel environment, exceptions sometimes have to be propagated across threads. Class `tbb_exception` subclasses `std::exception` to add support for such propagation.

## Members

            namespace tbb {
                class tbb_exception: public std::exception {
                    virtual tbb_exception* move() = 0;
                    virtual void destroy() throw() = 0;
                    virtual void throw_self() = 0;
                    virtual const char* name() throw() = 0;
                    virtual const char* what() throw() = 0;
                };
            }

Derived classes should define the abstract virtual methods as follows:

- `move()` should create a pointer to a copy of the exception that can outlive the original. It may move the contents of the original.

- `destroy()` should destroy a copy created by `move()`.

- `throw_self()` should throw `*this`.

- `name()` typically returns the RTTI name of the originally intercepted exception.

- `what()` returns a null-terminated string describing the exception.

Parent topic: Exceptions