From 99adeca653bc521be9bbabf53cdee250b9a113fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 26 Nov 2019 17:13:18 +0100 Subject: [PATCH 1/1] Switch to normal twig error --- Twig/Filter/CPackFilter.php | 10 +++++----- Twig/Filter/JPackFilter.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Twig/Filter/CPackFilter.php b/Twig/Filter/CPackFilter.php index 2edb1c4..ca38c3b 100644 --- a/Twig/Filter/CPackFilter.php +++ b/Twig/Filter/CPackFilter.php @@ -1,9 +1,9 @@ compress == 'minify') { $this->bin .= ' --minify'; //Unknown compress type - #XXX: default compression is pretty + //XXX: default compression is pretty } elseif ($this->compress !== 'pretty') { //Throw an error on unknown compress - throw new \Twig_Error(sprintf('Got unexpected compress for %s: %s', $this->bin, $this->compress), $this->line, $this->fileName); + throw new Error(sprintf('Got unexpected compress for %s: %s', $this->bin, $this->compress), $this->line, $this->fileName); } } } @@ -76,7 +76,7 @@ class CPackFilter implements FilterInterface { //Read content from stderr if (($stderr = stream_get_contents($pipes[2]))) { - throw new \Twig_Error(sprintf('Got unexpected strerr for %s: %s', $this->bin, $stderr), $this->line, $this->fileName); + throw new Error(sprintf('Got unexpected strerr for %s: %s', $this->bin, $stderr), $this->line, $this->fileName); } //Close stderr @@ -84,7 +84,7 @@ class CPackFilter implements FilterInterface { //Close process if (($ret = proc_close($proc))) { - throw new \Twig_Error(sprintf('Got unexpected non zero return code %s: %d', $this->bin, $ret), $this->line, $this->fileName); + throw new Error(sprintf('Got unexpected non zero return code %s: %d', $this->bin, $ret), $this->line, $this->fileName); } } diff --git a/Twig/Filter/JPackFilter.php b/Twig/Filter/JPackFilter.php index 199d980..ca4555d 100644 --- a/Twig/Filter/JPackFilter.php +++ b/Twig/Filter/JPackFilter.php @@ -1,9 +1,9 @@ compress == 'obfuscate') { $this->bin .= ' --obfuscate'; //Unknown compress type - #XXX: default compression is best + //XXX: default compression is best } elseif ($this->compress !== 'best') { //Throw an error on unknown compress - throw new \Twig_Error(sprintf('Got unexpected compress for %s: %s', $this->bin, $this->compress), $this->line, $this->fileName); + throw new Error(sprintf('Got unexpected compress for %s: %s', $this->bin, $this->compress), $this->line, $this->fileName); } } } @@ -82,7 +82,7 @@ class JPackFilter implements FilterInterface { //Read content from stderr if (($stderr = stream_get_contents($pipes[2]))) { - throw new \Twig_Error(sprintf('Got unexpected strerr for %s: %s', $this->bin, $stderr), $this->line, $this->fileName); + throw new Error(sprintf('Got unexpected strerr for %s: %s', $this->bin, $stderr), $this->line, $this->fileName); } //Close stderr @@ -90,7 +90,7 @@ class JPackFilter implements FilterInterface { //Close process if (($ret = proc_close($proc))) { - throw new \Twig_Error(sprintf('Got unexpected non zero return code %s: %d', $this->bin, $ret), $this->line, $this->fileName); + throw new Error(sprintf('Got unexpected non zero return code %s: %d', $this->bin, $ret), $this->line, $this->fileName); } } -- 2.41.0