Author: ornicar2
Date: 2010-01-16 15:15:30 +0100 (Sat, 16 Jan 2010)
New Revision: 26716
Modified:
plugins/diemPlugin/trunk/dmCorePlugin/lib/response/asset/compressor/dmJavascriptCompressor.php
Log:
[Diem]
- fixed bug when trying to compress malformed javascript file: now logs an
error message and leave the file uncompressed
Modified:
plugins/diemPlugin/trunk/dmCorePlugin/lib/response/asset/compressor/dmJavascriptCompressor.php
===================================================================
---
plugins/diemPlugin/trunk/dmCorePlugin/lib/response/asset/compressor/dmJavascriptCompressor.php
2010-01-16 14:04:41 UTC (rev 26715)
+++
plugins/diemPlugin/trunk/dmCorePlugin/lib/response/asset/compressor/dmJavascriptCompressor.php
2010-01-16 14:15:30 UTC (rev 26716)
@@ -29,7 +29,17 @@
{
if ($this->isMinifiable($path))
{
- $content = dmJsMinifier::transform($content);
+ try
+ {
+ $content = dmJsMinifier::transform($content);
+ }
+ catch(JsMinEnhException $e)
+ {
+ $this->dispatcher->notify(new sfEvent($this, 'application.log', array(
+ 'priority' => sfLogger::ERR,
+ sprintf('Javascript compression failed for %s: %s', $path,
$e->getMessage())
+ )));
+ }
}
return $content.';';
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.