[canvaskit] Add catchException everywhere

This should make the logs in the bots more actionable by showing
the error and trace.

This also fixes the API change causing mysterious red.

Bug: skia:
Change-Id: I38df2bb4557041f8bdfefcae5c8d95b58e770033
Reviewed-on: https://skia-review.googlesource.com/c/168180
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/modules/pathkit/tests/svg.spec.js b/modules/pathkit/tests/svg.spec.js
index ca3afe2..ad9e6df 100644
--- a/modules/pathkit/tests/svg.spec.js
+++ b/modules/pathkit/tests/svg.spec.js
@@ -16,7 +16,7 @@
     });
 
     it('can create a path from an SVG string', function(done) {
-        LoadPathKit.then(() => {
+        LoadPathKit.then(catchException(done, () => {
             //.This is a parallelagram from
             // https://upload.wikimedia.org/wikipedia/commons/e/e7/Simple_parallelogram.svg
             let path = PathKit.FromSVGString('M 205,5 L 795,5 L 595,295 L 5,295 L 205,5 z');
@@ -34,11 +34,11 @@
                                   [PathKit.CLOSE_VERB]]);
             path.delete();
             done();
-        });
+        }));
     });
 
     it('can create an SVG string from a path', function(done) {
-        LoadPathKit.then(() => {
+        LoadPathKit.then(catchException(done, () => {
             let cmds = [[PathKit.MOVE_VERB, 205, 5],
                        [PathKit.LINE_VERB, 795, 5],
                        [PathKit.LINE_VERB, 595, 295],
@@ -52,11 +52,11 @@
             expect(svgStr).toEqual('M205 5L795 5L595 295L5 295L205 5Z');
             path.delete();
             done();
-        });
+        }));
     });
 
     it('can create an SVG string from hex values', function(done) {
-        LoadPathKit.then(() => {
+        LoadPathKit.then(catchException(done, () => {
             let cmds = [[PathKit.MOVE_VERB, "0x15e80300", "0x400004dc"], // 9.37088e-26f, 2.0003f
                        [PathKit.LINE_VERB, 795, 5],
                        [PathKit.LINE_VERB, 595, 295],
@@ -69,11 +69,11 @@
             expect(svgStr).toEqual('M9.37088e-26 2.0003L795 5L595 295L5 295L9.37088e-26 2.0003Z');
             path.delete();
             done();
-        });
+        }));
     });
 
     it('should have input and the output be the same', function(done) {
-        LoadPathKit.then(() => {
+        LoadPathKit.then(catchException(done, () => {
             let testCases = [
                 'M0 0L1075 0L1075 242L0 242L0 0Z'
             ];
@@ -87,11 +87,11 @@
                 path.delete();
             }
             done();
-        });
+        }));
     });
 
     it('approximates arcs (conics) with quads', function(done) {
-        LoadPathKit.then(() => {
+        LoadPathKit.then(catchException(done, () => {
             let path = PathKit.NewPath();
             path.moveTo(50, 120);
             path.arc(50, 120, 45, 0, 1.75 * Math.PI);
@@ -106,7 +106,7 @@
              reportSVGString(svgStr, 'conics_quads_approx').then(() => {
                 done();
             }).catch(reportError(done));
-        });
+        }));
     });
 
 });