We recommend using Visual Studio 2017

bad_target Class


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

This class describes an exception thrown when a messaging block is given a pointer to a target which is invalid for the operation being performed.

class bad_target : public std::exception;

Public Constructors

bad_target::bad_target ConstructorOverloaded. Constructs a bad_target object.

This exception is typically thrown for reasons such as a target attempting to consume a message which is reserved for a different target or releasing a reservation that it does not hold.



Header: concrt.h

Namespace: concurrency

Constructs a bad_target object.

explicit _CRTIMP bad_target(_In_z_ const char* _Message) throw();

bad_target() throw();


A descriptive message of the error.

concurrency Namespace
Asynchronous Message Blocks