ralph/document_mapper — pull request #13 by rubiii (2011-12-28 11:43:30+00:00)
Title: rescue and re-raise yaml parser errors with a decent error message

while converting our current blog, i noticed that ruby 1.9's yaml parse errors
don't add much information about which file contains invalid yaml:

Class:
Message: <"(): couldn't parse YAML at line 1 column 11">

ruby 1.8's errors on the other hand are very helpful:

Class:
Message: <"syntax error on line 1, col 12: `title: Look: Invalid YAML!'"

so this patch rescues both kinds of errors and unifies the error messages.
especially useful when adding multiple documents at once.