結果 : how to get the error code from exception in python