Class Pcall

Pcall

Usage:

    Pcall(function()
         -- code to try
    end):pass(function()
         print("Passed!")
    end):fail(function()
         print("Failed!")
    end)
    

Methods

Pcall:pass (fn) Add pass function
Pcall:fail (fn) Add fail function
Pcall:done () Execute check function

Metamethods

Pcall:__call (t, check) Create a Pcall


Methods

Pcall:pass (fn)
Add pass function

Parameters:

  • fn function function to execute if pass the check function

Returns:

    Pcall
Pcall:fail (fn)
Add fail function

Parameters:

  • fn function function to execute if fail the check function
Pcall:done ()
Execute check function

Metamethods

Pcall:__call (t, check)
Create a Pcall

Parameters:

  • t table Check function
  • check function Check function

Returns:

    Pcall
generated by LDoc 1.4.6 Last updated 2019-10-12 17:17:18