[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] getShaderInfoLog/getProgramInfoLog format specification

It would be ideal if lines in the error messages match lines in the source, but when using a shader validator, this should generally be true.

However, enforcing a strict log format doesn't seem (to me) to have a large value for something which should only be dealt with at debugging time, and seems like a ton of extra work for implementers.


On Tue, Jan 6, 2015 at 2:31 AM, Florian Bösch <pyalot@gmail.com> wrote:
Some of the frequent problems with properly handling shader/program info log information is:
  • How to locate the line and column number (because different backends/browsers report it differently)
  • How to separate log entries (that may span multiple lines) into distinct entries for each error reported
  • empty error message ("")
  • unusable error messages (like those linker error messages that reference Direct3D intermediary bytecode and are piped trough straight
I'm wondering if it would make sense to come up with some sort of formal specification for WebGL 2.0 that ensures that:
  • the returned log info is a proper structure (lists/objects)
  • That line and column numbers are not mangled together with the log entry text
  • For convenience may include the sourceline
  • That ensures all reported errors are not piped trough from some backend, but are relevant to the source passed in
Maybe something along the lines of:

info-log := [error, error]
error := object {
  line: INT
  column: INT
  message: STRING
  sourceline: STRING