{@inheritdoc}

@throws Exception
965485
public function process(ContainerBuilder $container)
    {
        /** @var Glob $glob */
        $glob = $container->get(Glob::class);

        $locales = $glob->execGlob(ROOT . 'lang/*.po');
        $locales = array_map(function ($file) {
            return basename($file, '.po');
        }, $locales);

        $container->setParameter('locales', $locales);
    }
871656
public function process($value)
        {

            if ($this->isMandatory() && !$value)
            {
                throw new Exception($this->getMessage(self::IS_MISSING, ['param', $this->reference]));
            }

            $dataProcessor = $this->getDataProcessor();

            if ($dataProcessor instanceof ApplicationAwareInterface)
            {
                $dataProcessor->setApplication($this->getApplication());
            }

            $processedValue = $dataProcessor->process($value);

            if($this->isMandatory() && is_null($processedValue))
            {
                throw new Exception($this->getMessage(self::IS_MISSING, ['param', $this->reference]));
            }

            return $processedValue;
        }
940614
public function logException(Exception $exception, $message = null)
    {
        $msg = $exception->getMessage();
        if ($message != null) {
            $msg = "Message: " . $message . " Exception: " . $msg;
        }
        $this->doLog(LogHelper::LOG_LEVEL_FATAL, $msg, null);
    }
114630
public function execute($value)
    {
        if (!is_array($value) || count($value) != 2) {
            throw new \Exception('Value for number range comparison should have to values');
        }

        $queryBuilder = $this->getQueryBuilder();

        if (!empty($value[0])) {
            $queryBuilder->andHaving(
                $queryBuilder->expr()->gte(
                    $this->getIndex(),
                    ":{$this->getIndexClean()}_1"
                )
            )
                ->setParameter(
                    ":{$this->getIndexClean()}_1",
                    (float) $value[0]
                );
        }

        if (!empty($value[1])) {
            $queryBuilder->andHaving(
                $queryBuilder->expr()->lte(
                    $this->getIndex(),
                    ":{$this->getIndexClean()}_2"
                )
            )
                ->setParameter(
                    ":{$this->getIndexClean()}_2",
                    (float) $value[1]
                );
        }
    }
275337
public function sendException(\Exception $exception)
  {
    $this->setStatusCode($exception->getCode(), $exception->getMessage());

    $this->setJsonContent($this);

    return parent::send();
  }
1341544
@Override
    public final void exception ( Exception e ) {
        this.error = true;
        this.exception = e;
        this.received = true;
        synchronized ( this ) {
            notifyAll();
        }
    }
1352984
public function invoke($node, NodeInterface $parent): void
    {
        if (! $node instanceof Node\Stmt\Function_ || ! $parent instanceof PhpFileModelInterface) {
            throw new Exception('FunctionNodeParser is made to parse a function node');
        }

        $function = new FunctionModel();
        $function->setParentNode($parent);
        $function->setName($node->name);
        $function->setIsGlobal(true);

        $this->parseFunction($node, $function);

        if (($documentation = $node->getDocComment()) !== null) {
            $this->documentationNodeParser->invoke($documentation, $function);
        }

        $parent->addFunction($function);
    }
808200
public function remove($key, $value)
    {
        if (!$key)
        {
            throw new Exception('key may not be null.');
        }
        if (!is_array($value))
        {
            $value = [$value];
        }
        $this->_performOperation($key, new RemoveOperation($value));
    }
1046297
public function onException(GetResponseForExceptionEvent $event): void
    {
        if (!$event->isMasterRequest()) {
            return;
        }

        $attributes = $event->getRequest()->attributes;
        if ($attributes->get(SetIsApiRequestListener::API_FLAG_NAME) !== true) {
            return;
        }

        $exception = $event->getException();

        $this->logException($exception);

        $data = [
            'code' => $exception->getCode(),
            'message' => $exception->getMessage(),
        ];

        if ($exception instanceof HttpExceptionInterface) {
            $statusCode = $exception->getStatusCode();
            if (isset(Response::$statusTexts[$statusCode])) {
                $data['status_code'] = $statusCode;
                $data['status_text'] = Response::$statusTexts[$statusCode];
            }
        }

        if ($this->outputDebugInfo) {
            $debugException = $exception;
            if ($exception->getPrevious() instanceof Exception) {
                $debugException = $exception->getPrevious();
            }

            $debugException = FlattenException::create($debugException);

            $data['debug'] = [
                'file' => $debugException->getFile(),
                'line' => $debugException->getLine(),
                'trace' => $debugException->getTrace(),
            ];
        }

        $event->setResponse(new JsonResponse($data));
    }
402295
public void execute() throws Exception {
        // Read the properties file, if it exists.
        properties = new Properties();
        if (propertiesFile != null) {
            FileInputStream propertiesStream = null;
            try {
                propertiesStream = new FileInputStream(propertiesFile);
                properties.load(propertiesStream);
            } catch (final Exception e) {
                throw new RuntimeException(e);
            } finally {
                if (propertiesStream != null) {
                    try {
                        propertiesStream.close();
                    } catch (final IOException e) {
                        logger.error(e.getMessage(), e) ;
                    }
                }
            }
        } else {
            properties.putAll(Configuration.configuration);
        }
        if (!properties.containsKey(CONF_PLUGIN_DIRS)) {
            properties.setProperty(CONF_PLUGIN_DIRS, configuration.getOrDefault(CONF_PLUGIN_DIRS, "plugins;demo"));
        }
        if (!properties.containsKey(CONF_PLUGIN_IGNORES)) {
            properties.setProperty(CONF_PLUGIN_IGNORES, configuration.getOrDefault(CONF_PLUGIN_IGNORES, ""));
        }

        // Get the list of plugin directories from the properties.
        final String[] pluginDirs = properties.getProperty(CONF_PLUGIN_DIRS).split(PARAM_VALUE_SEPARATOR);

        final Set<String> pluginIgnores = new HashSet<>();
        if (properties.getProperty(CONF_PLUGIN_IGNORES) != null) {
            pluginIgnores.addAll(Arrays.asList(properties.getProperty(CONF_PLUGIN_IGNORES).split(PARAM_VALUE_SEPARATOR)));
        }

        final String pluginOrderProperty = properties.getProperty(CONF_PLUGIN_ORDER);
        if (pluginOrderProperty != null) {
            final List<String> plugins = asList(pluginOrderProperty.trim().split("\\s+"));
            Collections.reverse(plugins);
            int priority = 1;
            for (final String plugin: plugins) {
                pluginOrder.put(plugin, priority++);
            }
        }

        for (final String tmpl : properties.getProperty(CONF_TEMPLATES, "").split(PARAM_VALUE_SEPARATOR)) {
            final String t = tmpl.trim();
            if (t.length() != 0) {
                logger.warn(MessageUtils.getMessage("DOTJ080W", "templates", "template").toString());
                templateSet.put(t, null);
            }
        }

        for (final String pluginDir2 : pluginDirs) {
            File pluginDir = new File(pluginDir2);
            if (!pluginDir.isAbsolute()) {
                pluginDir = new File(ditaDir, pluginDir.getPath());
            }
            final File[] pluginFiles = pluginDir.listFiles();

            for (int i = 0; (pluginFiles != null) && (i < pluginFiles.length); i++) {
                final File f = pluginFiles[i];
                final File descFile = new File(pluginFiles[i], "plugin.xml");
                if (pluginFiles[i].isDirectory() && !pluginIgnores.contains(f.getName()) && descFile.exists()) {
                    descSet.add(descFile);
                }
            }
        }

        mergePlugins();
        integrate();
        logChanges(pluginList, getPluginIds(pluginsDoc));
    }
64344
public function writeException(Exception $e)
    {
        $class = get_class($e);
        $text = $this->adapter->colorize("Exception - $class:\n{$e->getMessage()}\n", ColorInterface::LIGHT_RED);

        if ($this->isVerbose()) {
            $text .= "\n" . $this->renderTrace($e->getTrace()) . "\n";

            if ($this->isVeryVerbose() && ($previous = $e->getPrevious())) {
                $text .= "\n" . $this->adapter->colorize('Previous Exceptions:', ColorInterface::YELLOW) . "\n\n";

                do {
                    $class = $this->adapter->colorize(get_class($previous), ColorInterface::YELLOW);
                    $msg = $this->adapter->colorize($previous->getMessage(), ColorInterface::GRAY);
                    $text .= sprintf('%s: %s', $class, $msg)
                           . "\n" . $this->renderTrace($e->getTrace()) . "\n\n";
                } while ($previous = $previous->getPrevious());
            }
        }

        $this->adapter->writeLine($text);
    }
1270376
public void execute() throws Exception
    {
        try 
        {
			sessionService.beginTransaction();
            log.info("Inserting InitialDatas");
			new InitialDatas(systemInfoDao, systemUnderTestDao, repositoryDao).insert();

            log.info("Inserting DefaultRunners");
			new DefaultRunners(systemUnderTestDao, properties).insert();

            log.info("Upgrading to version {} ", GreenPepperServer.VERSION);
			new ServerUpgrader(sessionService, systemInfoDao).upgradeTo(GreenPepperServer.VERSION);
			
			sessionService.commitTransaction();
		} 
        catch (Exception e) 
        {
        	sessionService.rollbackTransaction();
        	log.error("Bootstrap Failure: ", e);
        	throw new GreenPepperServerException("", "Boostrap Failure", e);
		}
    }
1202588
public function set($key, $value)
    {
        if (!$key)
        {
            throw new Exception('key may not be null.');
        }
        if (is_array($value))
        {
            throw new Exception('Must use setArray() or setAssociativeArray() for this value.');
        }
        $this->_performOperation($key, new SetOperation($value));
    }
1205450
public function dispatchException($exception) {
		if($this->isActive()) {
			if($this->dispatchPreviousExceptions && $exception->getPrevious()) {
				$this->dispatchException($exception->getPrevious());
			}
			$message = new ErrorMessage();
			$message->code = $exception->getCode();
			$message->class = get_class($exception);
			$message->data = $this->dumper->dump($exception->getMessage());
			$message->file = $exception->getFile();
			$message->line = $exception->getLine();
			$message->trace = self::fetchTrace($exception->getTrace(), $message->file, $message->line);
			$this->sendMessage($message);
		}
	}
767544
public function exec()
    {
        $result = $this->statement->execute();

        if ($result) {
            return $this;
        } else {
            throw new Exception($this->statement->errorInfo()[2]);
        }
    }
910927
public function setException(\Exception $exception = null)
    {
        $this->exception = $exception;
        $this->result = self::FAILED;
    }
209740
public function filter($request)
	{
		foreach($this->_filters as $filter)
		{
			if(!$request = $filter->filter($request))
			{
				throw new Exception("Filter returned a null request");
			}
		}

		return $request;
	}