@return string

@throws \Exception
173270
public function arch()
    {
        $version = json_decode($this->version());

        $os = $version->Os;

        $arch = $version->Arch;

        return $os.$arch;
    }
735621
public static function getRequestName(): string
    {
        if (substr(static::class, -strlen(static::REQUEST_SUFFIX)) !== static::REQUEST_SUFFIX) {
            throw new \Exception("Request class name must end with '".static::REQUEST_SUFFIX."'");
        }

        return substr(static::getMainNamespaceAndRequestParts()[3], 0, -strlen(static::REQUEST_SUFFIX));
    }
353942
protected function getExceptionName()
    {
        if ($this->exception instanceof Exception) {
            $name = $this->exception->getName();
        } elseif ($this->exception instanceof ErrorException) {
            $name = $this->exception->getName();
        } else {
            $name = $this->defaultName;
        }
        return $name;
    }
334382
public function toString()
    {
        return trim($this->getName() . ' ' . (!empty($this->version) && !$this->version->hidden ? $this->getVersion() : ''));
    }
893799
protected function getExceptionCode()
    {
        $exception = $this->getException();

        $code = $exception->getCode();
        if ($exception instanceof \ErrorException) {
            // ErrorExceptions wrap the php-error types within the 'severity' property
            $code = Misc::translateErrorCode($exception->getSeverity());
        }

        return (string) $code;
    }
1059133
public function getContent()
    {
        if ($this->_content === null) {
            if (!$this->canRead()) {
                throw new Exception("Unable to read config file {$this->file}.");
            }
            
            $buffer = $this->getFileContent($this->file);
            $this->_content = $this->jsonDecode($buffer);
        }
        
        return $this->_content;
    }
819664
protected function format_exception( Exception $exception ) {
		$string = get_class( $exception );

		if ( ! empty( $exception->getMessage() ) ) {
			$string .= " : {$exception->getMessage()}";
		}

		if ( ! empty( $exception->getCode() ) ) {
			$string .= " (#{$exception->getCode()})";
		}

		return $string;
	}
496713
public function getSettingsKey(): string
    {
        $key = $this->settingsKey;

        if (empty($this->$key)) {
            throw new Exception("No settings key is set on the constructor");
        }

        return $this->$key;
    }
842956
protected function getNameInput(): string
    {
        $name = trim($this->argument('name'));

        if (mb_strpos($name, '/') === false) {
            throw new \Exception('Module name must consist of two segments: vendor/module');
        }

        return $name;
    }
1168021
protected function getHtmlTemplate(): string
    {
        if ($this->HtmlTemplate === null) {
            throw (new \xltxlm\template\Exception\Exception_Filenot_Exist())
                ->setHtmlTemplate($this->HtmlTemplate);
        }
        if (empty($this->HtmlTemplate) == false) {
            eval("include '$this->HtmlTemplate';");
            return '';
        } else {
            $filepathold = (new \ReflectionClass(static::class))->getFileName();

            $filepath = strtr($filepathold, ['.php' => '.tpl.php']);
            if (is_file($filepath)) {
                eval("include '$filepath';");
                return $filepath;
            }

            $getFilename_no_Extension = (new Fileinfo($filepathold))
                ->getFilename_no_Extension();

            $filepath = dirname($filepath) . '/' . $getFilename_no_Extension . '/' . $getFilename_no_Extension . '.tpl.php';
            eval("include '$filepath';");
            if (is_file($filepath)) {
                return $filepath;
            } else {
                throw (new \xltxlm\template\Exception\Exception_Filenot_Exist())
                    ->setHtmlTemplate($this->HtmlTemplate);
            }
        }
    }
1309035
private function getMessage(\Exception $exception)
    {
        $message = $exception->getMessage();

        if ($this->isApiException($exception)) {
            $message = $exception->getMessageWithVariables();
        }

        return $message;
    }
113345
public function getArray()
    {
        $config = @include $this->location;
        if (!is_array($config)) {
            throw new \Exception('Config not found');
        }

        $this->config = $config;

        return $config;
    }
527763
public function getName()
    {
        if (!array_key_exists(self::NAME, $this->group)) {
            throw new \Exception('Could not get group name from group id.');
        }
        return $this->group[self::NAME];
    }
1118447
public function serialize()
    {
        if (!$this->_useBuffering) {
            $msg = 'You cannot serialize an un-buffered ResultSet. Use Query::bufferResults() to get a buffered ResultSet.';
            throw new Exception($msg);
        }

        while ($this->valid()) {
            $this->next();
        }

        if ($this->_results instanceof SplFixedArray) {
            return serialize($this->_results->toArray());
        }

        return serialize($this->_results);
    }
120781
public function getName()
	{
		if (empty($this->_name))
		{
			$this->_name = \App::get('request')->getCmd('controller');

			if (!$this->_name)
			{
				$r = null;

				if (!preg_match('/View((view)*(.*(view)?.*))$/i', get_class($this), $r))
				{
					throw new Exception('Cannot get or parse view class name.', 500);
				}

				if (strpos($r[3], 'view'))
				{
					throw new Exception('Classname contains the substring "view" which causes problems when extracting the classname.', 500);
				}

				$this->_name = strtolower($r[3]);
			}
		}
		return $this->_name;
	}
519220
public function generateResponse()
    {
        $exception = $this->getException();
        return sprintf(
            "%s: %s in file %s on line %d%s\n",
            get_class($exception),
            $exception->getMessage(),
            $exception->getFile(),
            $exception->getLine(),
            $this->getTraceOutput()
        );
    }
786099
protected function obtainRunnerFile(): string
    {
        $moduleInfos = $this->loadInfos;
        $runnerFile  = '';

        if (property_exists($moduleInfos, 'runner')) {
            $runnerFile = (string) $moduleInfos->runner;
        }

        if (empty($runnerFile)) {
            return '';
        }

        $runnerFile = MODULES_DIR.$this->name.'/'.$runnerFile;
        if (!file_exists($runnerFile)) {
            throw new Exception(
                'Runner file for module '.$this->name.' not found.',
                $this::ERR_RUNNER_FILE_NOT_FOUND
            );
        }

        return $runnerFile;
    }