Skip to content

validation_error

Samuel Martel edited this page Oct 6, 2022 · 1 revision

SequenceAlreadyDefined Exception

Triggered when a new Sequence uses the name of an already defined sequence.

Example

Sequence("MySequence", function(context) end)
Sequence("MySequence", function(context) end) -- Error! "MySequence" already exists.

NestedSequence Exception

Triggered when a Sequence is defined inside another sequence.

Example 1

Sequence("MySequence", function(context)
    Sequence("MyOtherSequence", function(context) end) -- Error! Cannot nest sequences into other sequences!
end)

Example 2

Sequence("MySequence", function(context)
    Test("MyTest", function(c)
        Sequence("MyOtherSequence", function(context) end) -- Error! Cannot nest sequences into other sequences!
    end)
end)

SequenceNotFound Exception

Triggered when a Sequence that does not exist gets queried in a Requires expression.

Example

Sequence("MySequence", function(context) 

end):Requires(Sequence("Foo"):ToPass()) -- Error! No sequence called Foo!

Clone this wiki locally