code: public static function hasError($strScope=TL_MODE)
  	{
  		$session = System::getContainer()->get('session');
  
  		if (!$session->isStarted())
  		{
  			return false;
  		}
  
  		return $session->getFlashBag()->has(static::getFlashBagKey('error', $strScope));
  	}
docs: Check if there are error messages
  
  @param string $strScope An optional message scope
  
  @return boolean True if there are error messages