@param string $remote
@param string $url
@param string $errorMessage

@throws InvalidPushException
765109
private function executeOriginalHook($remote, $url, $errorMessage)
    {
        $response = $this->prePushOriginalExecutor->execute($remote, $url);

        if (null != $response) {
            $this->output->writeln(BadJobLogoResponse::paint($errorMessage));

            throw new InvalidPushException();
        }
    }
1251541
public function push(string $errorMessage, ?string $key = null): self
    {
        if ($key === null) {
            $this->errors[] = $errorMessage;
        } else {
            $this->errors[$key][] = $errorMessage;
        }

        return $this;
    }
1287795
protected function fail($message, $http_status = 500)
    {
        if (!empty($this->options['fail_exception'])) {
            throw new Exception($message, $http_status);
        }

        if ($http_status === 500) {
            trigger_error($message, E_USER_WARNING);
        }

        if ($this->returnType === 'jsonp') {
            echo $_REQUEST['callback'] . "(" . json_encode(['error' => $message]) . ", $http_status);";
            exit();
        }

        if ($this->returnType === 'redirect') {
            $url = $_REQUEST['return_url'] . '?sso_error=' . $message;
            header("Location: $url", true, 307);
            echo "You're being redirected to <a href='{$url}'>$url</a>";
            exit();
        }

        http_response_code($http_status);
        header('Content-type: application/json; charset=UTF-8');

        echo json_encode(['error' => $message]);
        exit();
    }
541753
protected function err($msg, $url = null)
    {
        $this->saveDataInSession();
        return $this->msg($msg, self::MSG_BAD, $url);
    }
131420
public function triggerError($errorCode, $errorMessage = '')
    {
        $callError = $errorCode;

        if (!isset($this->error[$errorCode]) || !is_callable($this->error[$errorCode])) {
            if (isset($this->error[0]) && is_callable($this->error[0])) {
                $callError = 0;
            } else {
                // Nothing set to handle this error!
                return;
            }
        }

        // Error response function exists
        $this->match = true;

        //call_user_func_array($this->error[$errorCode], array($errorCode, $errorMessage));
        $this->error[$callError]($errorCode, $errorMessage);
        // Or use call_user_func_array ?

        exit($errorCode);
    }
95055
protected function error($msg = '', $url = null, $data = '', $wait = 3, array $header = [])
    {
        if (is_null($url)) {
            $url = $this->request->isAjax() ? '' : 'javascript:history.back(-1);';
        } elseif ('' !== $url && !strpos($url, '://') && 0 !== strpos($url, '/')) {
            $url = $this->request->scheme() . '://' . $this->request->host() . '/' . $url;
        }

        $type = $this->getResponseType();
        $result = [
            'code' => 0,
            'msg'  => $msg,
            'data' => $data,
            'url'  => $url,
            'wait' => $wait,
        ];

        if ('view' == strtolower($type)) {

            $this->assign('code', $result['code']);
            $this->assign('msg', $result['msg']);
            $this->assign('data', $result['data']);
            $this->assign('url', $result['url']);
            $this->assign('wait', $result['wait']);
            $result = $this->display(Config::get('dispatch_error_tmpl'));
        }

        HttpResponse::create($result, $type)->header($header)->send();
    }
1139623
private function _sendErrorNotification(&$oRemoteApp, $aResponse)
        {

            $iStatusCode = $aResponse['statuscode'];
            /*
             * Parse template by statuscode
             */
            if ($iStatusCode === 404) {
                $sHtml = $this->getContainer()->get('templating')->render('SlashworksAppBundle:Email:cron_error_404_notification.html.twig', array(
                    'remote_app' => $oRemoteApp,
                    'response'   => $aResponse,
                    'controlurl' => $this->_getSiteURL()
                ));
            } elseif ($iStatusCode === 500) {
                $sHtml = $this->getContainer()->get('templating')->render('SlashworksAppBundle:Email:cron_error_500_notification.html.twig', array(
                    'remote_app' => $oRemoteApp,
                    'response'   => $aResponse,
                    'controlurl' => $this->_getSiteURL()
                ));
            } elseif ($iStatusCode === 403) {
                $sHtml = $this->getContainer()->get('templating')->render('SlashworksAppBundle:Email:cron_error_403_notification.html.twig', array(
                    'remote_app' => $oRemoteApp,
                    'response'   => $aResponse,
                    'controlurl' => $this->_getSiteURL()
                ));
            } else {
                $sHtml = $this->getContainer()->get('templating')->render('SlashworksAppBundle:Email:cron_error_notification.html.twig', array(
                    'remote_app' => $oRemoteApp,
                    'response'   => $aResponse,
                    'controlurl' => $this->_getSiteURL()
                ));
            }

            // translate Subject
            $sSubject = $this->getContainer()->get('translator')->trans('system.email.error.' . $iStatusCode . '.subject');

            // get recipients and sender
            $sRecipient = $oRemoteApp->getNotificationRecipient();
            $sSender    = $oRemoteApp->getNotificationSender();
            $sMessage   = \Swift_Message::newInstance()->setSubject($sSubject)->setFrom($sSender)->setTo($sRecipient)->setContentType('text/html')->setBody($sHtml, 'text/html')->addPart($sHtml, 'text/html');

            // send notification
            $this->getContainer()->get('mailer')->send($sMessage);
        }
392838
public void onMessageReceived(RemoteMessage remoteMessage) {

		if (LoggerUtils.isEnabled()) {
			StringBuilder builder = new StringBuilder();
			builder.append("Message received. ");
			builder.append("from: ");
			builder.append(remoteMessage.getFrom());

			if (remoteMessage.getMessageType() != null) {
				builder.append(", ");
				builder.append("message type: ");
				builder.append(remoteMessage.getMessageType());
			}

			if (remoteMessage.getData() != null & !remoteMessage.getData().isEmpty()) {
				builder.append(", ");
				builder.append("data: ");
				builder.append(remoteMessage.getData());
			}
			LOGGER.info(builder.toString());
		}

		FcmMessageResolver fcmResolver = AbstractFcmAppModule.get().getFcmMessageResolver();
		if (fcmResolver != null) {
			FcmMessage fcmMessage = null;
			try {
				fcmMessage = fcmResolver.resolve(remoteMessage);
			} catch (Exception e) {
				AbstractApplication.get().getExceptionHandler().logHandledException("Error when resolving FCM message", e);
				return;
			}

			if (fcmMessage != null) {
				try {
					fcmMessage.handle(remoteMessage);
				} catch (Exception e) {
					AbstractApplication.get().getExceptionHandler().logHandledException("Error when handling FCM message", e);
				}
			} else {
				LOGGER.warn("The FCM message was not resolved");
			}
		} else {
			LOGGER.warn("A FCM message was received, but not resolved is configured");
		}

		for (FcmEventsListener fcmEventsListener : FcmContext.getFcmEventsListeners()) {
			try {
				fcmEventsListener.onMessageReceived(remoteMessage);
			} catch (Exception e) {
				AbstractApplication.get().getExceptionHandler().logHandledException(e);
			}
		}
	}
1126908
public function token_callback_checkbox_remote( $args ) {
		$checked = isset( self::$options_remote[ $args['id'] ] ) ? self::$options_remote[ $args['id'] ] : null;
		?>
		<label for="<?php esc_attr_e( $args['id'] ); ?>">
			<input type="checkbox" id="<?php esc_attr_e( $args['id'] ); ?>" name="github_updater_remote_management[<?php esc_attr_e( $args['id'] ); ?>]" value="1" <?php checked( '1', $checked ); ?> >
			<?php echo $args['title']; ?>
		</label>
		<?php
	}
924356
public static function throwCurlException($errorMessage, $errorCode)
    {
        $exception = new Adyen_Payment_Exception($errorMessage, $errorCode);
        self::logException($exception);

        throw $exception;
    }
946052
public static function createErrorReply(
        ContextInterface $context,
        $errorValue,
        int $errorCode,
        string $messageTemplate,
        array $messageParams
    ): array {
        return [
            static::REPLY_SUCCESS_VALUE => null,
            static::REPLY_ERRORS_INFO   => [
                static::createErrorInfoEntry(
                    $context->getCurrentBlockId(),
                    $errorValue,
                    $errorCode,
                    $messageTemplate,
                    $messageParams
                ),
            ],
        ];
    }
928983
protected function jsonErrorResponse($errorMessage, $statusCode = 400, array $httpHeaders = array())
    {
        $statusTexts = \Symfony\Component\HttpFoundation\Response::$statusTexts;

        return $this->jsonResponse(array(
            'error' => (string) $errorMessage,
        ), array(
            'status' => array(
                'code'    => (int) $statusCode,
                'message' => $statusTexts[$statusCode],
            ),
        ), $httpHeaders);
    }
540215
public void init(RemoteTask server, BaseMessageQueue baseMessageQueue)
        throws RemoteException
    {
        super.init(baseMessageQueue);
        m_sendQueue = server.createRemoteSendQueue(baseMessageQueue.getQueueName(), baseMessageQueue.getQueueType());
    }
1060406
function (server, type, para, onDone) {
	
	var url = server + 'event/' + type;
	LOG.warn('remoteEvent url: ' + url, 'Entry');
	UTIL.HTTPpost(url, para, function(err, res, resObj) {
		if (err) {
			// get port fail, try to trace
			LOG.stack();
			UTIL.safeCall(onDone);
			return;
		}
		
		UTIL.safeCall(onDone, resObj[SR.Tags.UPDATE], resObj[SR.Tags.PARA]);
	});
}
1340697
protected function handleError( $errorCode, $errorMessage, $query )
	{
		if( $this->errorLevel )
		{
			$log = new \FS_File_Log_Writer( $this->logFile );
			$log->note( "[".$errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")]" );
			if( $this->errorLevel == 2 )
				trigger_error( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")", E_USER_WARNING );
			else if( $this->errorLevel == 3 )
				trigger_error( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")", E_USER_ERROR );
			else if( $this->errorLevel == 4 )
				throw new \Exception( $errorCode.": ".$errorMessage." in EXECUTE (\"".$query."\")" );
		}
	}
349102
@Subscribe
    public void error(ReplicationErrored re) {
        Log.e(LOG_TAG, "Replication error:", re.errorInfo);
        mHandler.post(new Runnable() {
            @Override
            public void run() {
                if (mListener != null) {
                    mListener.replicationError();
                }
            }
        });
    }
587161
private function checkAnswer($secretKey, $remoteip, $response)
    {
        if ($remoteip == null || $remoteip == "") {
            throw new ValidatorException("vihuvac_recaptcha.validator.remote_ip");
        }

        // discard spam submissions
        if ($response == null || strlen($response) == 0) {
            return false;
        }


        $response = $this->httpGet(self::RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/siteverify", array(
            "secret"   => $secretKey,
            "remoteip" => $remoteip,
            "response" => $response
        ));

        return json_decode($response, true);
    }