/**
* Get the global application object. When the global application doesn't exist, an exception is thrown.
*
* @return CMSApplicationInterface object
*
* @since 1.7.0
* @throws \Exception
*/
public static function getApplication()
{
if (!self::$application) {
throw new \Exception('Failed to start application', 500);
}
return self::$application;
}