diff --git a/docs/api-reference/errors/index.md b/docs/api-reference/errors/index.md index 7d0f16194..001137ff2 100644 --- a/docs/api-reference/errors/index.md +++ b/docs/api-reference/errors/index.md @@ -23,6 +23,28 @@ the details for you. +----- + +
+

+ since v0.3 +

+ +## attributeNameNil + +``` +Attribute name cannot be nil. +``` + +This message occurs when you try to set an attribute with a 'nil' name. +This error shouldn't occur, however it is a failsafe incase something goes wrong. + +```Lua +local folder = New "Configuration" { + [Attribute(nil)] = "Foo" +} +``` + -----
@@ -86,6 +108,28 @@ local textBox = New "TextBox" { ----- +
+

+ since v0.3 +

+ +## cannotConnectAttributeChange + +``` +The Configuration class doesn't have an attribute called 'Foo'. +``` + +This message means you tried to connect to an attribute change event, however +the connection failed to register. + +```Lua +-- How does an example for this work? +-- An attribute change shouldn't fail, as GetAttributeChangedSignal +-- doesn't error if the attribute doesn't exist. +``` + +----- +

since v0.1 @@ -507,6 +551,29 @@ local input = New "TextBox" { ----- +

+

+ since v0.3 +

+ +## invalidAttributeChangeHandler + +``` +The change handler for the 'Ammo' attribute must be a function. +``` + +This message means you tried to use [AttributeChange](../instances/attributechange) on an +instance's attribute, but instead of passing a function callback, you passed +something else. + +```Lua +local config = New "Configuration" { + [AttributeChange "Ammo"] = "guns" +} +``` + +----- +

since v0.2 @@ -606,6 +673,29 @@ local thing = New "Part" { ----- +

+

+ since v0.3 +

+ +## invalidAttributeOutType + +``` +[AttributeOut] properties must be given Value objects. +``` + +This message means you tried to use [AttributeOut](../instances/attributeout), but you didn't also +give it a [value object](../state/value) to store the attributes's value inside +of. + +```Lua +local config = New "Configuration" { + [AttributeChange "Ammo"] = "guns" +} +``` + +----- +

since v0.2 @@ -632,6 +722,27 @@ local thing = New "Part" { ----- +

+

+ since v0.3 +

+ +## invalidAttributeOutName + +``` +The Configuration class doesn't have an attribute called 'Ammo' +``` + +This message means you tried to read an attribute of an instance using +[AttributeOut](../instances/attributeout), but the attribute can't be read. This error +shouldn't occur, however it is here for a failsafe. + +```Lua +-- Once again, how does an example for this work? +``` + +----- +

since v0.1