-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api-minor] Reject the RenderTask
with an actual Error
, instead of just a string
, when rendering is cancelled
#8157
[api-minor] Reject the RenderTask
with an actual Error
, instead of just a string
, when rendering is cancelled
#8157
Conversation
Hmm, that really falls under category [api-major]. At the moment I don't really see best way to resolve it. Can we introduce something like |
… to allow backwards incompatible API changes
…f just a `string`, when rendering is cancelled This patch gets rid of the only case in the code-base where we're throwing a plain `string`, rather than an `Error`, which besides better/more consistent error handling also allows us to enable the [`no-throw-literal`](http://eslint.org/docs/rules/no-throw-literal) ESLint rule.
There's still some work necessary if we want to be able to run (even a subset of) the API unit-tests on Travis. However, this patch could be considered a small first step, since the relevant unit-tests will now rely on a `CanvasFactory` rather than using `document.createElement('canvas')` directly.
@yurydelendik Very good points, thank you! |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/f16d203f4cd3c8e/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/450b325ea2ae812/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/450b325ea2ae812/output.txt Total script time: 22.33 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/f16d203f4cd3c8e/output.txt Total script time: 28.18 mins
|
Thank you for the patch |
…cel-Error [api-minor] Reject the `RenderTask` with an actual `Error`, instead of just a `string`, when rendering is cancelled
This patch gets rid of the only case in the code-base where we're throwing a plain
string
, rather than anError
, which besides better/more consistent error handling also allows us to enable theno-throw-literal
ESLint rule.This change is