much improved error handling
much improved error handling

we are doing two things here. One is to use PHP's built-in trigger_error
as this will work correctly for both Smarty 2 and Smarty 3 (where
Smarty::trigger_error is gone).

The other thing is to catch possible exceptions raised during the
transformation process and making sure that no cache file is written in
that case.

This ensures that sacy will have to rerun in such cases.

If the problem is a syntax error in Coffee Script for example, this
point is moot of course because fixing the syntax error will change the
file anyways, but if the issue is somewhere in the invocation of the
external tools, it's possible that the fix doesn't involve the source
files in which case this would have required the cache to be flushed
manually (or a file to be touched)

pilif/sacy,fjg/sacy