nodeca/js-yaml — pull request #33 by scrooloose (2011-12-20 13:09:37+00:00)
Title: refactor MarkedYAMLError.toString

Hey, I tweaked the output of compact errors. The commit message (copied in below) explains it pretty well. Let me know if there is anything I can do :-)

Split the toString method up so that there is now toStringFull() and
toStringCompact(), and toString(compact) delegates off depending on
whether compact was passed in.

The reason for this is because I have tweaked the display of the compact
error messages, and rather than adding more logic to toString() it
seemed more sensible to split it up.

Compact error messages now look like:

Error on line 7, col 1: could not found expected ':'

The motivation for this change is increased parsability and readability.