Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse(self, project_info):
filename = self.path_handler.join(project_info.project_path(), "index.xml")
self.file_state_cache.update(filename)
try:
# Try to get from our cache
return self.cache[filename]
except KeyError:
# If that fails, parse it afresh
try:
result = breathe.parser.doxygen.index.parse(filename)
self.cache[filename] = result
return result
except breathe.parser.doxygen.index.ParseError, e:
raise ParserError(e, filename)
except breathe.parser.doxygen.index.FileIOError, e:
raise FileIOError(e, filename)
def parse(self, project_info):
filename = self.path_handler.join(project_info.path(), "index.xml")
try:
# Try to get from our cache
return self.cache[filename]
except KeyError:
# If that fails, parse it afresh
try:
result = breathe.parser.doxygen.index.parse(filename)
self.cache[filename] = result
return result
except breathe.parser.doxygen.index.ParseError:
raise ParserError(filename)