def cactus_class_method_exception_handle(function):
"""
This function provides a general wrapper for
handling errors with the Cactus engine. Example
usage:
@cactus_class_method_exception_handle
def my_class_method(self, args):
code
"""
def wrapper(self, *args, **kwargs):
try:
return function(self, *args, **kwargs)
except Exception as cactus_game_error:
with open("cactus_error_log.txt", "w+") as cactus_error_log: