{@inheritdoc}
@throws Exception
174740
public function getEntry($entryId) {
        $this->gotoEntry($entryId);
        return $this->getFile()->fread(self::B_SZ);
    }
223574
public function execAction()
    {
        //no action defined
        if(!$this->action) {
            throw new \Exception(sprintf('no action defined for subject %s', $this->name));
        }
        //exec method
        try {
            $this->checkTraitsInjections();
            $this->traitsInit();
            $this->{'exec'.$this->sanitizeAction($this->action)}();
        } catch(Exception $exception) {
        //no method defined
            throw new Exception(sprintf('no method for handling %s %s %s', AREA, $this->name, $this->action));
        }
    }
1312689
@Override
    public void run() throws Exception {
        QueueContainer queueContainer = getContainer();
        if (queueContainer.hasEnoughCapacity(txSize + 1)) {
            response = queueContainer.txnOfferReserve(transactionId);
        }
    }
1178062
public function execute()
	{
		$query  = $this->factory->builder($this->update)->process();
		$result = $this->pdo->query($query);
		if(!$result)
		{
			throw new \Exception('An error while updating is occurred');
		}
	}
1110332
protected function initialize() {
	$request   = bootstrap::get_library('request');
	$response  = bootstrap::get_library('response');
	$exception = bootstrap::get_library('exception');
	
	$this->url    = $request::get_url();
	$this->method = $request::get_method();
	
	if (empty($this->method)) {
		throw new $exception('unknown http method', $response::STATUS_METHOD_NOT_ALLOWED);
	}
}
362274
private function exception() : void
    {
        if ($this->response->getStatusCode() === Response::HTTP_FORBIDDEN) {
            throw ServiceException::invalidApiKey();
        }

        if ($this->response->getStatusCode() === Response::HTTP_UNPROCESSABLE_ENTITY) {
            throw ServiceException::invalidPayload();
        }

        if ($this->response->getStatusCode() === Response::HTTP_TOO_MANY_REQUESTS) {
            throw ServiceException::rateLimit();
        }

        if ($this->response->getStatusCode() === Response::HTTP_INTERNAL_SERVER_ERROR) {
            throw ServiceException::serverError();
        }

        throw ServiceException::generic();
    }
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);
    }
450359
public function create()
    {
        //try to save all the fields we allow
        {
            if ($this->model->save($this->request->getPost(), $this->createFields)) {
                return $this->response($this->model->toArray());
            } else {
                //if not thorw exception
                throw new Exception($this->model->getMessages()[0]);
            }
        }
    }
847253
public function setArray($key, $value)
    {
        if (!$key)
        {
            throw new Exception('key may not be null.');
        }
        if (!is_array($value))
        {
            throw new Exception('Must use set() for non-array values.');
        }
        $this->_performOperation($key, new SetOperation($value));
    }
593428
public function exception($exception = null)
    {
        if (!func_num_args()) {
            return $this->_exception;
        }
        $this->_exception = $exception;
        return $this;
    }
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));
    }
677002
public void execute() throws Exception {
        ActionRequest request = requestBuilder.request();

        //todo: maby change to instanceof multi?
        if(requestBuilder instanceof JoinRequestBuilder){
            executeJoinRequestAndSendResponse();
        }
		else if (request instanceof SearchRequest) {
			client.search((SearchRequest) request, new RestStatusToXContentListener<SearchResponse>(channel));
		} else if (requestBuilder instanceof SqlElasticDeleteByQueryRequestBuilder) {
            throw new UnsupportedOperationException("currently not support delete on elastic 2.0.0");
        }
        else if(request instanceof GetIndexRequest) {
            this.requestBuilder.getBuilder().execute( new GetIndexRequestRestListener(channel, (GetIndexRequest) request));
        }


		else {
			throw new Exception(String.format("Unsupported ActionRequest provided: %s", request.getClass().getName()));
		}
	}
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);
		}
    }
992880
public function run()
    {
        if (!$this->isAppRootSet()) {
            throw new Exception("The application root wasn't defined.", 1);
        }
        if (!$this->isConfigFileSet()) {
            throw new Exception("The main config file wasn't defined.", 2);
        }
        $sConfigPath = $this->getAppRoot().$this->getConfigFile();
        if (!is_readable($sConfigPath)) {
            throw new Exception("It's unable to load ".$sConfigPath
            .'as main config file.', 4);
        }
        $mConfig = include $sConfigPath;
        if (!is_array($mConfig)) {
            throw new Exception('The main config must be an array.', 5);
        }
        $this->configSet = $mConfig;
    }
725889
public static function exception($exception): void
    {
        self::getInstance()->error(
            $exception->getMessage() . ' [' .
            $exception->getFile() . ':' .
            $exception->getLine() . ']'
        );
    }
1019073
public function invoke($node, NodeInterface $parent): void
    {
        if (! $node instanceof Node\Stmt\Namespace_ || ! $parent instanceof PhpFileModelInterface) {
            throw new Exception('NamespaceNodeParser is made to parse a namespace node');
        }

        if ($node->name instanceof Node\Name) {
            $parent->setNamespace($node->name->parts);
        }

        $this->preParseUses($node->stmts, $parent);

        $this->parseSubNodes($node->stmts, $parent);
    }
136155
public void start() throws Exception {
		server = new Server();
		ServerConnector connector = new ServerConnector(server);
		if (serverAddress != null) {
			connector.setHost(serverAddress.getHostAddress());
		}
		connector.setPort(serverPort);
		server.addConnector(connector);
		server.setHandler(new JmxWebHandler());
		server.start();
	}