diff options
author | Caroline Tice <cmtice@google.com> | 2016-07-22 16:28:12 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-07-27 07:23:18 -0700 |
commit | 9099a788cd7124024559c064e425ed9caef6e0ac (patch) | |
tree | 87df663ff83ab398121cd66e9528422979a63cf6 /crosperf/benchmark_run.py | |
parent | 19e119b46c14f57988ba3504369e815d3aab0122 (diff) | |
download | toolchain-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 'crosperf/benchmark_run.py')
-rw-r--r-- | crosperf/benchmark_run.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crosperf/benchmark_run.py b/crosperf/benchmark_run.py index 5d161417..d2a6f7d9 100644 --- a/crosperf/benchmark_run.py +++ b/crosperf/benchmark_run.py @@ -163,7 +163,7 @@ class BenchmarkRun(threading.Thread): while True: machine = None if self.terminated: - raise Exception('Thread terminated while trying to acquire machine.') + raise RuntimeError('Thread terminated while trying to acquire machine.') machine = self.machine_manager.AcquireMachine(self.label) @@ -191,7 +191,7 @@ class BenchmarkRun(threading.Thread): perf_args_list = [perf_args_list[0]] + ['-a'] + perf_args_list[1:] perf_args = ' '.join(perf_args_list) if not perf_args_list[0] in ['record', 'stat']: - raise Exception('perf_args must start with either record or stat') + raise SyntaxError('perf_args must start with either record or stat') extra_test_args = ['--profiler=custom_perf', ("--profiler_args='perf_options=\"%s\"'" % perf_args)] return ' '.join(extra_test_args) |