saltstack/salt — pull request #8364 by terminalmage (2013-11-08 23:43:56+00:00)
Title: Yaml render error fix

This pull request does more graceful handling of yaml rendering errors, providing the context where the error occurred instead of simply displaying a traceback.

It adds a new exception class, ``RenderError``.

Before adding this, indenting a yaml template using a tab instead of spaces would generate a long and cryptic traceback. With this new code, the same misconfigured yaml triggers the following error:

```
root@virtubuntu:~# salt virtubuntu state.sls test
virtubuntu:
Data failed to compile:
----------
Rendering SLS failed: Illegal tab character, line 5 of template
---
#include:
# - test2

/tmp/test.txt:
file.touch <======================

---
```