BWAPI::Error class

The Error object is generally used to determine why certain functions in BWAPI have failed.

For example, you may not have enough resources to construct a unit.

Base classes

template<class T, int UnknownId>
class Type<Error, Errors::Enum::Unknown>
Base superclass for all BWAPI Types.

Constructors, destructors, conversion operators

Error(int id = Errors::Enum::None) explicit constexpr
Expected type constructor.

Function documentation

BWAPI::Error::Error(int id = Errors::Enum::None) explicit constexpr

Expected type constructor.

Parameters
id The id that corresponds to this type. It is typically an integer value that corresponds to an internal Broodwar type. If the given id is invalid, then it becomes Types::Unknown.

If the type is an invalid type, then it becomes Types::Unknown. A type is invalid if its value is less than 0 or greater than Types::Unknown.