* @license GNU General Public License, version 2 (GPL-2.0) * * For full copyright and license information, please see * the docs/CREDITS.txt file. * */ namespace phpbb\console; use phpbb\exception\exception_interface; use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\Console\Event\ConsoleExceptionEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class exception_subscriber implements EventSubscriberInterface { /** * @var \phpbb\language\language */ protected $language; /** * Construct method * * @param \phpbb\language\language $language Language object * @param bool $debug Debug mode */ public function __construct(\phpbb\language\language $language, $debug = false) { $this->language = $language; $this->debug = $debug; } /** * This listener is run when the ConsoleEvents::EXCEPTION event is triggered. * It translate the exception message. If din debug mode the original exception is embedded. * * @param ConsoleExceptionEvent $event */ public function on_exception(ConsoleExceptionEvent $event) { $original_exception = $event->getException(); if ($original_exception instanceof exception_interface) { $parameters = array_merge(array($original_exception->getMessage()), $original_exception->get_parameters()); $message = call_user_func_array(array($this->language, 'lang'), $parameters); if ($this->debug) { $exception = new \RuntimeException($message , $original_exception->getCode(), $original_exception); } else { $exception = new \RuntimeException($message , $original_exception->getCode()); } $event->setException($exception); } } static public function getSubscribedEvents() { return array( ConsoleEvents::EXCEPTION => 'on_exception', ); } } rpo_2_1'>topic/Corpo_2_1 Mageia Installer and base platform for many utilitiesThierry Vignaud [tv]
summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/data.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-12-13 15:56:00 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-12-13 15:56:00 +0000
commit4b9d142bd37dcdc94b7bcdbdb3f7109d7a915e25 (patch)
treea12104a3a9468cc42b83634feb5e6a2e72003532 /perl-install/printer/data.pm
parentf298cec9f7d4bb4dc1972cc737007b6da86d4cb0 (diff)
downloaddrakx-4b9d142bd37dcdc94b7bcdbdb3f7109d7a915e25.tar
drakx-4b9d142bd37dcdc94b7bcdbdb3f7109d7a915e25.tar.gz
drakx-4b9d142bd37dcdc94b7bcdbdb3f7109d7a915e25.tar.bz2
drakx-4b9d142bd37dcdc94b7bcdbdb3f7109d7a915e25.tar.xz
drakx-4b9d142bd37dcdc94b7bcdbdb3f7109d7a915e25.zip
better english (writing style rather than spoken one)
Diffstat (limited to 'perl-install/printer/data.pm')
-rw-r--r--perl-install/printer/data.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/printer/data.pm b/perl-install/printer/data.pm
index 75616daf5..6e1dc4041 100644
--- a/perl-install/printer/data.pm
+++ b/perl-install/printer/data.pm
@@ -37,7 +37,7 @@ our %spoolers = ('pdq' => {
'help' => "/usr/bin/pdq -h -P %s 2>&1 |",
'print_command' => 'lpr-pdq',
'print_gui' => 'xpdq',
- 'long_name' => N("PDQ - Print, Don't Queue"),
+ 'long_name' => N("PDQ - Print, Do not Queue"),
'short_name' => N("PDQ"),
'local_queues' => 1,
'packages2add' => [ [ 'pdq' ], [qw(/usr/bin/pdq /usr/X11R6/bin/xpdq)] ],