Port of this gist to normal github for use with .gitmodules
- Usage:
from error import error #put this in your import statements at the top of your script.
# handling a input error;
choice = int(input('enter a number:'))
if choice >= 0:
print(choice)
else:
error.problem(8, 0 ,'filename')
# handling a exception during a try: loop;
try:
bad_thing
except:
error.problem(15, 16, 'filename')
- To use in .gitmodules: Refer to this repo.