[Webkit-unassigned] [Bug 145583] add errors to run-benchmark exception handling.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 2 18:13:19 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=145583

Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #254128|review?                     |review+
              Flags|                            |

--- Comment #1 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 254128
  --> https://bugs.webkit.org/attachment.cgi?id=254128
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254128&action=review

> Tools/Scripts/run-benchmark:42
> +    except Exception as e:

Can we spell out either exception or error instead of e?

> Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:36
> +        except Exception as e:
>              self.clean()
> -            raise
> +            raise e

Apparently you don't need this in Python to forward the exception object.

> 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)

Why are we also passing errorCode as the second argument??

> Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py:42
> +        except IOError as e:

Ditto about spelling out error or exception.

> Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py:84
> +                result = json.loads(result)
>                  results.append(result)

We can probably just both of these in one line:
results.append(json.loads(result))

> Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py:85
> +            except Exception as e:

Ditto about spelling out e.

> Tools/Scripts/webkitpy/benchmark_runner/generic_factory.py:23
> -            except KeyError:
> -                raise
> +            except KeyError as e:
> +                raise e

Ditto about not needing this.

> Tools/Scripts/webkitpy/benchmark_runner/generic_factory.py:31
> +        except Exception as e:
> +            raise e

Ditto.

> 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))

Spellout exception or error.

> Tools/Scripts/webkitpy/benchmark_runner/utils.py:44
> +    except Exception as e:

Ditto.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150603/6e0f4c9f/attachment-0001.html>


More information about the webkit-unassigned mailing list