-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Description
This is a convenience for developers that ought to have no affect on uysers
When there is an error in a shader, the log shows "Error in Line 64" and then a dump of the source code. As a convenience, there should be line numbers in the console log to make it easier to find where the mistake is.
This is a small change to WglShader.js. Patch is already written.
if (!ignored) {
console.warn("WebGLShader: gl.getShaderInfoLog() wasn't empty: " + gl.getShaderInfoLog(shader));
// The error message often includes line numbers, so best if our console log has them.
let sourceCodeLines = sourceCode.split("\n");
let annotatedLines = sourceCodeLines.map((element, index) =>
`${(index + 1).toString().padStart(3)} ${element}`)
console.warn("Source code was: \n" + annotatedLines.join("\n"));
}
Metadata
Metadata
Assignees
Labels
No labels