..
This commit is contained in:
@ -30,16 +30,16 @@ def loadConfig(configPath):
|
||||
if not config:
|
||||
raise ValueError("Empty configuration file")
|
||||
|
||||
print("Configuration loaded successfully.")
|
||||
print(f"{Colors.GREEN}Configuration loaded successfully.{Colors.RESET}")
|
||||
return config
|
||||
except FileNotFoundError:
|
||||
print(f"Error: Configuration file not found at ./{configPath}")
|
||||
print(f"{Colors.RED}Error: Configuration file not found at ./{configPath}{Colors.RESET}")
|
||||
sys.exit(1)
|
||||
except yaml.YAMLError as e:
|
||||
print(f"Error parsing YAML configuration: {e}")
|
||||
print(f"{Colors.RED}Error parsing YAML configuration: {e}{Colors.RESET}")
|
||||
sys.exit(1)
|
||||
except ValueError as e:
|
||||
print(f"Configuration error: {e}")
|
||||
print(f"{Colors.RED}Configuration error: {e}{Colors.RESET}")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user