error

Draftsman errors. Used to enforce “Factorio-safety”.

exception DataFormatError

Issued when a value passed in to a method or attribute violates the required structure for that data, such that it violates “Factorio-correctness”.

exception DraftsmanError

Default error for draftsman. Issued when some behavior directly conflicts with the module’s function.

exception DuplicateIDError

Raised when two EntityLike’s are added to a EntityCollection with the same ID, which is disallowed.

exception EntityNotCircuitConnectableError

Raised when a circuit connection is attempted between an entity or entities that cannot be connected with circuit wires.

exception EntityNotPowerConnectableError

Raised when a power connection is attempted between an entity or entities that cannot be connected with power wires.

exception FlippingError

Raised when attempting to flip a EntityCollection that contains entities that cannot be flipped.

exception IncompatableModError

Raised when two mods in the factorio-mods folder specify the other as incompatible.

exception IncorrectBlueprintTypeError

Raised when attempting to construct a Blueprint object without the "blueprint" key or a BlueprintBook without the "blueprint_book" key in their root trees. Most commonly issued when trying to create a Blueprint with a BlueprintBook string, and vice-versa.

exception IncorrectModFormatError

Raised when the format of a loaded mod conflicts with expectations.

exception IncorrectModVersionError

Raised when a loaded mod’s version is incompatible with the version of Factorio or the versions of other mods.

exception InvalidAssociationError

Raised when an Association to an Entity still persists even when the Entity that it refers to has been deleted, or when attempting to create an Association between entities that don’t exist within the EntityCollection they should.

exception InvalidConnectionSideError

Raised when a circuit connection is connected to a side other than 1 or 2.

exception InvalidEntityError

Raised when an Entity’s name is not one of the similar_entities for it’s child type, or when it is not any valid entry in draftsman.data.entities.raw.

exception InvalidFluidError

Raised when a InfinityPipe’s fluid is set to anything other than a valid entry in draftsman.data.signals.fluid.

exception InvalidInstrumentID

Raised when setting a ProgrammableSpeaker’s instrument to a number that exceeds it’s instrument count, or a string that is not the name of any of it’s instruments.

exception InvalidItemError

Raised when an item name does not match any valid entry in draftsman.data.items.raw.

exception InvalidModeError

Raised when a string mode doesn’t match any valid value for that particular method.

exception InvalidModuleError

Raised when an input module name is not an entry in draftsman.data.modules.raw

exception InvalidNoteID

Raised when setting a ProgrammableSpeaker’s note to a number that exceeds the number of notes in it’s selected instrument, or a string that is not the name of any of the notes created by the current instrument.

exception InvalidOperationError

Raised whan a condition is set to have an unrecognized operation for that particular case.

exception InvalidRecipeError

Raised when an input recipe name is not an entry in draftsman.data.recipes.raw.

exception InvalidSideError

Raised when a Splitter’s input or output priority is set to something other than "left" or "right".

exception InvalidSignalError

Raised when a signal name does not match any valid entry in draftsman.data.signals.raw.

exception InvalidTileError

Raised when creating a Tile with, or changing it’s name to, anything other than a valid tile name.

exception InvalidWireTypeError

Raised when either a circuit wire is not either "red" or "green" or when a power wire connection type is not either "Cu0" or "Cu1".

exception MalformedBlueprintStringError

Raised when a blueprint string cannot be resolved due to an error with the zlib or base64 decompression. This usually means that the string is either missing characters or has been encoded improperly.

exception MissingModError

Raised when a mod depends on another to function, but the desired mod is not in the factorio-mods folder.

exception RotationError

Raised when a rotation angle has been chosen that does not align with the possible rotations that the EntityCollection can have, such as rotations by 45 degrees.

exception UnreasonablySizedBlueprintError

Raised when a Blueprint exceeds 10,000 x 10,000 tiles in relative size. Note that this is not about distance from the origin; rather the distance from the furthest entities on either axis across the Blueprint.