I have a Javascript function:
function drawSheaf(word_sheaf) {
pageOffset = (parseInt(word_sheaf.page_number, 10) - 1) * PAGE_OFFSET_MULTIPLIER;
console.log(CTX);
CTX.beginPath();
CTX.fillStyle='black';
CTX.fillText(word_sheaf.word, word_sheaf.x_small/SCALING_FACTOR, word_sheaf.y_big/SCALING_FACTOR + pageOffset);
}
Which is resulting in the following console output:
Page loaded main.js:25:13
CanvasRenderingContext2D { canvas: canvas#canvas, mozCurrentTransform: (6) […], mozCurrentTransformInverse: (6) […], mozTextStyle: "12px Arial", mozImageSmoothingEnabled: true, globalAlpha: 1, globalCompositeOperation: "source-over", strokeStyle: "#000000", fillStyle: "#000000", filter: "none" }
editor.js:93:13
Uncaught DOMException: An exception was thrown editor.js:94
Uncaught DOMException: An exception was thrown editor.js:13
Use of mozImageSmoothingEnabled is deprecated. Please use the unprefixed imageSmoothingEnabled property instead. localhost:8004
Line 94 is CTX.beginPath()
Line 13 is in another function. In that case CTX.rect is the offending call.
How do you debug an error like this? The only hint here is the deprecation warning. But that's (a) a warning not an error and (b) not part of the DOMException. Expanding the DOMException only shows the code path to arrive there. I don't see an exception name or code.
The function runs fine on Chrome and draws the word as expected.