Source code for ax.exceptions.storage
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-strict
from ax.exceptions.core import AxError
STORAGE_DOCS_SUFFIX = (
"Please see our storage tutorial (https://ax.dev/docs/storage.html) "
"for more details ('Customizing' section will be "
"relevant for saving Ax object subclasses)."
)
[docs]
class JSONDecodeError(AxError):
"""Raised when an error occurs during JSON decoding."""
pass
[docs]
class JSONEncodeError(AxError):
"""Raised when an error occurs during JSON encoding."""
pass
[docs]
class SQADecodeError(AxError):
"""Raised when an error occurs during SQA decoding."""
pass
[docs]
class SQAEncodeError(AxError):
"""Raised when an error occurs during SQA encoding."""
pass
[docs]
class ImmutabilityError(AxError):
"""Raised when an attempt is made to update an immutable object."""
pass
[docs]
class IncorrectDBConfigurationError(AxError):
"""Raised when an attempt is made to save and load an object, but
the current engine and session factory is setup up incorrectly to
process the call (e.g. current session factory will connect to a
wrong database for the call).
"""
pass