How to use the cumulusci.core.exceptions.CumulusCIException function in cumulusci

To help you get started, we’ve selected a few cumulusci examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SFDO-Tooling / CumulusCI / cumulusci / core / exceptions.py View on Github external
""" Raise for errors related to scratch orgs """

    pass


class GithubException(CumulusCIException):
    """ Raise for errors related to GitHub """

    pass


class GithubApiError(CumulusCIException):
    pass


class GithubApiNotFoundError(CumulusCIException):
    pass


class GithubApiNoResultsError(CumulusCIException):
    pass


class GithubApiUnauthorized(CumulusCIException):
    pass


class SalesforceException(CumulusCIException):
    """ Raise for errors related to Salesforce """

    pass
github SFDO-Tooling / CumulusCI / cumulusci / tasks / release_notes / exceptions.py View on Github external
from cumulusci.core.exceptions import CumulusCIException


class GithubIssuesError(CumulusCIException):
    pass


class LastReleaseTagNotFoundError(CumulusCIException):
    pass
github SFDO-Tooling / CumulusCI / cumulusci / core / exceptions.py View on Github external
pass


class GithubApiNotFoundError(CumulusCIException):
    pass


class GithubApiNoResultsError(CumulusCIException):
    pass


class GithubApiUnauthorized(CumulusCIException):
    pass


class SalesforceException(CumulusCIException):
    """ Raise for errors related to Salesforce """

    pass


class SalesforceDXException(CumulusCIException):
    """ Raise for errors related to Salesforce DX """

    pass


class SOQLQueryException(CumulusCIFailure):
    """ Raise for errors related to Salesforce DX """

    pass
github SFDO-Tooling / CumulusCI / cumulusci / tasks / apexdoc.py View on Github external
)
        if "banner_page" not in self.options:
            self.options["banner_page"] = (
                self.project_config.project__apexdoc__banner
                if self.project_config.project__apexdoc__banner
                else None
            )
        if "scope" not in self.options:
            self.options["scope"] = (
                self.project_config.project__apexdoc__scope
                if self.project_config.project__apexdoc__scope
                else None
            )
        if "version" not in self.options:
            if not self.project_config.project__apexdoc__version:
                raise CumulusCIException("ApexDoc version required")
            self.options["version"] = self.project_config.project__apexdoc__version
github SFDO-Tooling / CumulusCI / cumulusci / core / exceptions.py View on Github external
""" Raised when no project can be found in the current context """

    pass


class ProjectConfigNotFound(CumulusCIUsageError):
    """ Raised when a project is found in the current context but no configuration was found for the project """

    pass


class ProjectMinimumVersionError(CumulusCIException):
    pass


class KeychainNotFound(CumulusCIException):
    """ Raised when no keychain could be found """

    pass


class KeychainKeyNotFound(CumulusCIUsageError):
    """ Raised when the keychain key couldn't be found """

    pass


class OrgNotFound(CumulusCIUsageError):
    """ Raised when no org could be found by a given name in the project keychain """

    pass
github SFDO-Tooling / CumulusCI / cumulusci / core / exceptions.py View on Github external
class GithubException(CumulusCIException):
    """ Raise for errors related to GitHub """

    pass


class GithubApiError(CumulusCIException):
    pass


class GithubApiNotFoundError(CumulusCIException):
    pass


class GithubApiNoResultsError(CumulusCIException):
    pass


class GithubApiUnauthorized(CumulusCIException):
    pass


class SalesforceException(CumulusCIException):
    """ Raise for errors related to Salesforce """

    pass


class SalesforceDXException(CumulusCIException):
    """ Raise for errors related to Salesforce DX """
github SFDO-Tooling / CumulusCI / cumulusci / tasks / salesforce / custom_settings.py View on Github external
email_address = setting_instance["location"]["user"][
                                    "email"
                                ]
                                query = f"SELECT Id FROM User WHERE Email = '{email_address}'"
                        elif "org" == setting_instance["location"]:
                            # Assign the Setup Owner Id to the organization.
                            query = "SELECT Id FROM Organization"

                    if query is None:
                        raise CumulusCIException(
                            f"No valid Setup Owner assignment found for Custom Setting {custom_setting}. Add a `location:` key."
                        )

                    matches = self.sf.query(query)
                    if matches["totalSize"] != 1:
                        raise CumulusCIException(
                            f"{matches['totalSize']} records matched the settings location query {query}. Exactly one result is required."
                        )

                    setup_owner_id = matches["records"][0]["Id"]

                    # We can't upsert on SetupOwnerId. Query for any existing records.
                    existing_records = self.sf.query(
                        f"SELECT Id FROM {custom_setting} WHERE SetupOwnerId = '{setup_owner_id}'"
                    )

                    setting_instance["data"].update({"SetupOwnerId": setup_owner_id})
                    if existing_records["totalSize"] == 0:
                        self.logger.info(
                            f"Loading Hierarchy Custom Setting {custom_setting} with owner id {setup_owner_id}"
                        )
                        proxy_obj.create(setting_instance["data"])
github SFDO-Tooling / CumulusCI / cumulusci / core / exceptions.py View on Github external
pass


class DeploymentException(CumulusCIFailure):
    """ Raised when a metadata api deployment error occurs """

    pass


class ApexTestException(CumulusCIFailure):
    """ Raised when a build fails because of an Apex test failure """

    pass


class SalesforceCredentialsException(CumulusCIException):
    """ Raise when Salesforce credentials are invalid """

    pass


class TaskRequiresSalesforceOrg(CumulusCIUsageError):
    """ Raise when a task that requires a Salesforce org_config is not initialized with an org_config """

    pass


class TaskOptionsError(CumulusCIUsageError):
    """ Raise when a task's options are invalid """

    pass
github SFDO-Tooling / CumulusCI / cumulusci / core / exceptions.py View on Github external
def __str__(self):
        line, problem = self.args
        return "Apex compilation failed on line {}: {}".format(line, problem)


class ApexException(CumulusCIFailure):
    """ Raise when an Apex Exception is raised in an org """

    def __str__(self):
        message, stacktrace = self.args
        stacktrace = "\n  ".join(stacktrace.splitlines())
        return "Apex error: {}\n  Stacktrace:\n  {}".format(message, stacktrace)


class PushApiObjectNotFound(CumulusCIException):
    """ Raise when Salesforce Push API object is not found """

    pass


class RobotTestFailure(CumulusCIFailure):
    """ Raise when a robot test fails in a test suite """

    pass


class BulkDataException(CumulusCIException):
    """ Raise for errors from bulkdata tasks """

    pass
github SFDO-Tooling / CumulusCI / cumulusci / salesforce_api / exceptions.py View on Github external
self.response = response


class MetadataComponentFailure(MetadataApiError):
    pass


class MetadataParseError(MetadataApiError):
    pass


class MissingOAuthError(CumulusCIException):
    pass


class MissingOrgCredentialsError(CumulusCIException):
    pass