I have a simple try and except statement. However I want to use logger exception to log the exception. What is the best way of only have 1 line of code for the logger.exception. In the exception base class ?
try:
do_something()
except CustomBaseExecption, exc:
logger.exception("Exception Raised:")
raise GeneralError(exc)
except Exception as exc:
logger.exception("Exception Raised:")
raise GeneralError("Unknown Error")