Skip to content

Instantly share code, notes, and snippets.

@trAve3113r
Created May 1, 2018 16:59
Show Gist options
  • Save trAve3113r/f2ac24dda0d9738cfe5fda3f85e9334e to your computer and use it in GitHub Desktop.
Save trAve3113r/f2ac24dda0d9738cfe5fda3f85e9334e to your computer and use it in GitHub Desktop.
def my_wrapper(func):
try:
return func
except MyException as e:
return "My traceback"
def my_task(*args,**kwargs):
yada = x + 1
return yada
# primitive usage::
# learn how to write a proper wrapper in python
def execute_my_task():
return my_wrapper(my_task(*args,**kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment