Skip to content

Commit

Permalink
added some exception handling for io (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
floriantschopp authored and mikepurvis committed Mar 26, 2019
1 parent a499c09 commit 501ca5c
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions catkin_tools/execution/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,23 @@ def close(self):
logfile.write(self.stderr_buffer)

def get_interleaved_log(self):
"""Get decoded interleaved log."""
return self._decode(self.interleaved_buffer)

"""get decoded interleaved log."""
try:
return self._decode(self.interleaved_buffer)
except:
return "interleaved_log: some output cannot be displayed.\n"
def get_stdout_log(self):
"""Get decoded stdout log."""
return self._decode(self.stdout_buffer)

"""get decoded stdout log."""
try:
return self._decode(self.stdout_buffer)
except:
return "stdout_log: some output cannot be displayed.\n"
def get_stderr_log(self):
"""Get decoded stderr log."""
return self._decode(self.stderr_buffer)
"""get decoded stderr log."""
try:
return self._decode(self.stderr_buffer)
except:
return "stderr_log: some output cannot be displayed.\n"

def _encode(self, data):
"""Encode a Python str into bytes.
Expand Down

0 comments on commit 501ca5c

Please # to comment.