except ã§ã¨ã©ã¼ãæå®ããªãã£ãæã«ã©ããªã¨ã©ã¼ãçºçãããè¦ã
try: hogehoge() except: print sys.exc_info()[0]
ã£ã¦æ¸ããã¨ãã¦ãã
id:nishiohirokazu å çã«
exceptionType, exceptionValue, exceptionTraceback = sys.exc_info()
ã£ã¦ããã¨ããã
[0]ã¯1å¹´å¾ã«å°ãç¾½ç®ã«ãªããã
ã¨æãã¦ããã ããï¼ï¼ï¼
1å¹´å¾ã®èªåãããªãããããããã£ã¦è¨ãã¨ããæå³ã§
絶対è¨ããåãªãééããªãè¨ãã
ãã¨ã0çªç®ãä½ãªã®ãããã¥ã¡ã³ãè¦ã¦èª¿ã¹ãã®ããã©ããã¨ããããã
ããã¾ããã§ããï¼ï¼
åãè¨ãã¨æãã®ã§æ¸ãç´ãã¾ãï¼ï¼ï¼