Module: gears.protected_call

Safely call a function and handle errors using gears.debug.

This is a pcall/xpcall wrapper. All it does is to integrate into the AwesomeWM-wide error handling and logging.

Info:

  • Copyright: 2016 Uli Schlachter
  • Originally authored by: Uli Schlachter
    (Full contributors list available on our github project)

Static module functions

gears.protected_call (func, ...) -> () Call a function in protected mode and handle error-reporting.


Static module functions

🔗 gears.protected_call (func, ...) -> ()
Call a function in protected mode and handle error-reporting. If the function call succeeds, all results of the function are returned. Otherwise, an error message is printed and nothing is returned.

Parameters:

Name Type(s) Description
func function The function to call
... Arguments to the function

Returns:

    The result of the given function, or nothing if an error occurred.
generated by LDoc 1.5.0