我试图在python2.7中定义我自己的异常类,派生自BaseException。classNestedCommentException(BaseException):"""Exceptionfornestedcomments"""def__init__(self,file_path,list_lines):self.file_path=file_pathself.list_lines=list_linesdef__repr__(self):returnself.__str__()def__str__(self):return'File{0}containsnestedcomments