Errors
When Class++ displays an error message to the output, it will have a short ID at the end. This allows you to identify what kind of error or message that is.
You can use that ID to find the details about that error or message down below.
attemptToModifyReadOnlyTable
You've attempted modify a read-only table within Class++. This usually occurs when you try to modify the Inherits
, Friends
and Statics
tables of a class
.
attemptToCreateObjectFromAbstractClass
You tried to create an object
from an abstract class
. Abstract classes are not meant to create objects from, rather, they are meant to be a base-class that a class
inherits from.
attemptToExtendAFinalClass
You tried to create a class
from a final class
. Final classes are not meant to be inherited from.
cannotCallFunctionError
You've tried to call a function within a class
without creating an object
. Class functions are not meant to be used directly, rather, they are to be used from objects. (Excluding static members.)
cannotFindBaseClassMethod
You've tried to call a property with super()
in the base class
that cannot be found, or wasn't a function.
classAlreadyExists
You've tried to create a class
that already has been created with the same name. Consider changing the name of the new class
.
classClassDataInternal
You've attempted to access the classData
property of a class
directly. This property is meant to be used internally, and is not meant for external use. This property only shows up in the auto-complete to support type-checking in certain cases.
classDataNotTable
You've given a classData
value that is not a table to the class
function. The class
function only takes a table as its classData
parameter.
classDataContainsMetatable
You've given a classData
value that contains a metatable attached to it. For security and performance reasons, classData
parameter only takes a raw table without any metatables attached to it.
classMemberCannotSetToNil
You've attempted to set a class member within the object
to nil. Setting member values to nil causes certain bugs to happen (due to the nature of dictionaries), so it is not allowed to set them to nil.
Consider setting it to a value such as false
to indicate that it is no longer in use.
classMemberNotFound
You've tried to index the object
with a member that does not exist within the classData
table. Members can only be added or removed through changing the classData
table given to the class
function.
classNameNotString
The class
function expected a string
as it's name, but you provided something else. A class
's name can only be a string
.
classNotFound
A class
cannot be found with the provided name argument. Make sure the name is correct, or if the class
actually exists.
classNoMatchingFunctionError
You've used an operator on an object
which had no overloads set for it.
classObjectLocked
You've tried to use an object
after it's been locked.
classPropertyIsPrivate
You've tried to access a private member of an object
outside of a class function.
classPropertyIsProtected
You've tried to access a protected member of an object
outside of a class function.
classPropertyIsInternal
You've tried to access an internal member of an object
. Internal members are not accessible.
classPropertyRedeclaration
You've tried to declare a property that has already been declared in another access-specifier. You can only declare a member in one access-specifier.
expectedFunctionError
The functionsTable
that you provided to class.overload
function had a value that wasn't a function.
extendsDeprecated
You've tried to use the now deprecated extends
function for inheritance.
See the discussion #4
for more info.
invalidAccessSpecifierError
You've provided a value that wasn't a valid access specifier. Make sure the given string
contains a valid access-specifier.
invalidAccessSpecifierInClassData
You've given a classData
value that contains invalid access-specifiers or functions. Make sure the access-specifier or function names are correct.
invalidDestructorCall
You've tried to call the Destroy()
without providing the object
as its first argument. Calling it with a ':' like :Destroy()
, passes the object
argument automatically.
invalidModifierArgument
You've given a value to a modifier function that wasn't a table containing classes.
invalidPropertyDecleration
You've tried to create a reserved property in a class
.
Some property names are reserved for certain functions that come by default for every object
, so you cannot declare them inside the classData
value.
invalidSuperCall
You've tried to call the super()
function from a class
that either wasn't inheriting from another class
, or it was inheriting from multiple class
es.
illegalModifierCombination
You've tried to create an illegal combination of modifiers. Certain modifiers have opposite functionality, so combining them is not possible.
nonNativeOperatorCall
You've tried to call an operator function without its operator. Operator functions are meant to be called with their operators.
overloadfunctionArgumentMismatch
A function to handle the given number of arguments ... have not been provided for the overloaded function: ...
You haven't provided a function to the functionsTable
to handle the given number of arguments for an overloaded function.
overloadfunctionNameNotSet
You haven't provided a name for the overloaded function.
overloadfunctionTableNotGiven
You haven't provided a functionsTable
for the overloaded function.
staticMemberNameNotSet
You haven't provided a name for the static member.
typeofObjectNotFound
The provided object's type cannot be found.
unknownError
Class++ ran into a problem, but it cannot associate it with a valid error type. This is meant to be a fallback error, and may only occur if the internal code isn't running properly.