BWAPI  4.2.0
An API for interacting with Starcraft: Broodwar (1.16.1)
Public Member Functions | List of all members
BWAPI::Error Class Reference
Inheritance diagram for BWAPI::Error:
Inheritance graph

Public Member Functions

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

Detailed Description

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.

See also
Game::getLastError, Game::setLastError, Errors

Constructor & Destructor Documentation

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

Expected type constructor.

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.

Parameters
idThe 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.

References BWAPI::Errors::allErrors().