diff --git a/Flame/Modules/Config/ConfigFile.php b/Flame/Modules/Config/ConfigFile.php
index <HASH>..<HASH> 100644
--- a/Flame/Modules/Config/ConfigFile.php
+++ b/Flame/Modules/Config/ConfigFile.php
@@ -66,11 +66,16 @@ class ConfigFile extends Object implements IConfigFile
 
 	/**
 	 * @return array
+	 * @throws \Nette\InvalidStateException
 	 */
 	public function getConfigSection()
 	{
 		$config = $this->getConfig();
-		return (isset($config['modules'])) ? $config['modules'] : array();
+		if(isset($config['modules'])) {
+			return $config['modules'];
+		}
+
+		throw new InvalidStateException('Missing section "modules" in configuration file.');
 	}
 
 	/**
Throw exception if modules section does not exist