Sid Gifari From Gifari Industries - BD Cyber Security Team
Home
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
websiteisolation
/
✏️
Editing: exceptions.py
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2026 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT class ErrorCode: """Stable `code` values of isolatectl error responses (CLOS-7520). Callers such as LVE Manager branch on these; the accompanying message is for people and may change. Add values, never rename one. """ NOT_ALLOWED = 'not_allowed' # per-domain limits not enabled for the account DOMAIN_NOT_OWNED = 'domain_not_owned' # the domain is not the caller's NOT_ISOLATED = 'not_isolated' # the domain has no registered domain LVE ID INVALID_VALUE = 'invalid_value' # an argument or limit value is not acceptable CONFIG_UNREADABLE = 'config_unreadable' # ~/.lve/domains.json cannot be used KERNEL_ERROR = 'kernel_error' # the kernel refused the change for another reason BACKEND_UNAVAILABLE = 'backend_unavailable' # a helper, the kernel feature, the panel or a lock is unavailable INTERNAL_ERROR = 'internal_error' # anything else class LvdError(Exception): """A websiteisolation failure; *code* is one of ErrorCode.""" def __init__(self, *args, code=ErrorCode.INTERNAL_ERROR): super().__init__(*args) self.code = code class LvdConfigError(LvdError): pass
💾 Save
❌ Cancel