Render customClass if it defined

Also, keep context and rule objects accessible inside error.
Merge pull request #1 from andresmoschini/master

Render customClass if it defined