#coding=utf-8 class YouNeedError(Exception): pass try: raise YouNeedError("lola") except Exception as e: print str(e)