aboutsummaryrefslogtreecommitdiff
path: root/test_gdb_dejagnu.py
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-07-22 16:28:12 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-27 07:23:18 -0700
commit9099a788cd7124024559c064e425ed9caef6e0ac (patch)
tree87df663ff83ab398121cd66e9528422979a63cf6 /test_gdb_dejagnu.py
parent19e119b46c14f57988ba3504369e815d3aab0122 (diff)
downloadtoolchain-utils-9099a788cd7124024559c064e425ed9caef6e0ac.tar.gz
[crosperf] Clean up exceptions.
Found all instances of 'raise Exception' and changed them to raise something slightly more specific. Changed a few 'except Exception' statements appropriately as well. BUG=chromium:566255 TEST=None Change-Id: If2666bd55838342bc71431e5e6ab2157c2c9e125 Reviewed-on: https://chrome-internal-review.googlesource.com/270731 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'test_gdb_dejagnu.py')
-rwxr-xr-xtest_gdb_dejagnu.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test_gdb_dejagnu.py b/test_gdb_dejagnu.py
index a1c44dc9..4f44527f 100755
--- a/test_gdb_dejagnu.py
+++ b/test_gdb_dejagnu.py
@@ -32,12 +32,12 @@ class DejagnuAdapter(object):
'--minilayout', '--jobs=8']
ret = setup_chromeos.Main(cmd)
if ret:
- raise Exception('Failed to checkout chromeos')
+ raise RuntimeError('Failed to checkout chromeos')
## Do cros_sdk and setup_board, otherwise build_tc in next step will fail.
cmd = 'cd {0} && cros_sdk --download'.format(self._chromeos_root)
ret = self._cmd_exec.RunCommand(cmd, terminated_timeout=9000)
if ret:
- raise Exception('Failed to create chroot.')
+ raise RuntimeError('Failed to create chroot.')
def SetupBoard(self):
cmd = './setup_board --board=' + self._board
@@ -45,7 +45,7 @@ class DejagnuAdapter(object):
cmd,
terminated_timeout=4000)
if ret:
- raise Exception('Failed to setup board.')
+ raise RuntimeError('Failed to setup board.')
def CheckGDB(self):
args = [gdb_dejagnu.__file__, '--board=' + self._board,
@@ -135,7 +135,7 @@ def ProcessArguments(argv):
options = parser.parse_args(argv)
if not options.board or not options.remote:
- raise Exception('--board and --remote are mandatory options.')
+ raise SyntaxError('--board and --remote are mandatory options.')
return options