Answers for "python decorator for error handling"

0

python decorator for error handling

def safe_run(func):

    def func_wrapper(*args, **kwargs):

        try:
           return func(*args, **kwargs)

        except Exception as e:

            print(e)
            return None

    return func_wrapper
Posted by: Guest on October-04-2020

Code answers related to "python decorator for error handling"

Python Answers by Framework

Browse Popular Code Answers by Language