# Specific Exceptions

## Summary

Exceptions thrown by other library components.

## Syntax

    class bad_last_alloc;
    class improper_lock;
    class invalid_multiple_scheduling;
    hclass missing_wait;
    class user_abort;

## Header

    #include "tbb/tbb_exception.h"

## Description

The table below describes when the exceptions are thrown.

Classes for Specific Exceptions.

Exception | Thrown when...
--- | ---
bad_last_alloc | A `pop` operation on a `concurrent_queue` or `concurrent_bounded_queue` corrersponds to a push that threw an exception. An operation on a `concurrent_vector` cannot be performed because a prior operation threw an exception.
improper_lock | A thread attempts to lock a `critical_section` or `reader_writer_lock` that it it has already locked.
invalid_multiple_scheduling | A `task_group` or `structured_task_group` attempts to run a `task_handle` twice.
missing_wait | A `push` or `pop` operation on a `concurrent_bounded_queue` was aborted by the user.`wait()` is invoked.
user_abort |

## Members

    namespace tbb {
            class bad_last_alloc: public std::bad_alloc {
            public:
                const char* what() const throw();
            };
            class improper_lock: public std::exception {
            public:
                const char* what() const throw();
            };
            class invalid_multiple_scheduler: public std::exception {
               const char* what() const throw();
            };
            class missing_wait: public std::exception {
            public:
                const char* what() const throw();
            };
            class user_abort : public std::exception {
            public:
               const char* what() const throw();
            };

        }

Parent topic: Exceptions