diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-02 19:53:59 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-02 19:53:59 +0900 |
commit | 8b5742dd8b3d6e437703ca02553804ce7cc9d53d (patch) | |
tree | 915f03ce2fed5a89474b0ba6f7946c8badc2a155 | |
parent | 6c9c2d422c6ba1014ac6d8a2bf25801396cdf0da (diff) | |
download | buildstream-8b5742dd8b3d6e437703ca02553804ce7cc9d53d.tar.gz |
_exceptions.py: Adding new AppError exception and error domain
-rw-r--r-- | buildstream/_exceptions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/buildstream/_exceptions.py b/buildstream/_exceptions.py index fb42d9fd2..27045bece 100644 --- a/buildstream/_exceptions.py +++ b/buildstream/_exceptions.py @@ -70,6 +70,7 @@ class ErrorDomain(Enum): PROG_NOT_FOUND = 12 SOURCE = 10 ELEMENT = 11 + APP = 12 # BstError is an internal base exception class for BuildSream @@ -231,3 +232,12 @@ class PipelineError(BstError): super().__init__(message, detail=detail, domain=ErrorDomain.PIPELINE, reason=reason) self.terminated = terminated + + +# AppError +# +# Raised from the frontend App directly +# +class AppError(BstError): + def __init__(self, message, detail=None, reason=None): + super().__init__(message, detail=detail, domain=ErrorDomain.APP, reason=reason) |