<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:rniwa@webkit.org" title="Ryosuke Niwa <rniwa@webkit.org>"> <span class="fn">Ryosuke Niwa</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - add errors to run-benchmark exception handling."
href="https://bugs.webkit.org/show_bug.cgi?id=145583">bug 145583</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #254128 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - add errors to run-benchmark exception handling."
href="https://bugs.webkit.org/show_bug.cgi?id=145583#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - add errors to run-benchmark exception handling."
href="https://bugs.webkit.org/show_bug.cgi?id=145583">bug 145583</a>
from <span class="vcard"><a class="email" href="mailto:rniwa@webkit.org" title="Ryosuke Niwa <rniwa@webkit.org>"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=254128&action=diff" name="attach_254128" title="patch">attachment 254128</a> <a href="attachment.cgi?id=254128&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=254128&action=review">https://bugs.webkit.org/attachment.cgi?id=254128&action=review</a>
<span class="quote">> Tools/Scripts/run-benchmark:42
> + except Exception as e:</span >
Can we spell out either exception or error instead of e?
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:36
> + except Exception as e:
> self.clean()
> - raise
> + raise e</span >
Apparently you don't need this in Python to forward the exception object.
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:45
> - raise Exception('Cannot create the benchmark', errorCode)
> + raise Exception('Cannot create the benchmark - Error: %s' % errorCode, errorCode)</span >
Why are we also passing errorCode as the second argument??
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py:42
> + except IOError as e:</span >
Ditto about spelling out error or exception.
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py:84
> + result = json.loads(result)
> results.append(result)</span >
We can probably just both of these in one line:
results.append(json.loads(result))
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py:85
> + except Exception as e:</span >
Ditto about spelling out e.
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/generic_factory.py:23
> - except KeyError:
> - raise
> + except KeyError as e:
> + raise e</span >
Ditto about not needing this.
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/generic_factory.py:31
> + except Exception as e:
> + raise e</span >
Ditto.
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/utils.py:38
> + except Exception as e:
> + raise Exception("Invalid json format or empty json was found in %s - Error %s" % (filePath, e))</span >
Spellout exception or error.
<span class="quote">> Tools/Scripts/webkitpy/benchmark_runner/utils.py:44
> + except Exception as e:</span >
Ditto.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>