Sam Chiu | 81bdc65 | 2018-06-29 18:45:08 +0800 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # |
| 3 | # Copyright 2018 - The Android Open Source Project |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | r"""Custom Exceptions for acloud.""" |
| 17 | |
| 18 | |
| 19 | class SetupError(Exception): |
| 20 | """Base Setup cmd exception.""" |
| 21 | |
| 22 | |
| 23 | class PackageInstallError(SetupError): |
| 24 | """Error related to package installation.""" |
| 25 | |
| 26 | |
| 27 | class RequiredPackageNotInstalledError(SetupError): |
| 28 | """Error related to required package not installed.""" |
| 29 | |
| 30 | |
| 31 | class UnableToLocatePkgOnRepositoryError(SetupError): |
| 32 | """Error related to unable to locate package.""" |
| 33 | |
| 34 | |
| 35 | class NotSupportedPlatformError(SetupError): |
| 36 | """Error related to user using a not supported os.""" |
herbertxue | 34776bb | 2018-07-03 21:57:48 +0800 | [diff] [blame] | 37 | |
| 38 | |
| 39 | class ParseBucketRegionError(SetupError): |
| 40 | """Raised when parsing bucket information without region information.""" |
herbertxue | 2625b04 | 2018-08-16 23:28:20 +0800 | [diff] [blame] | 41 | |
| 42 | |
| 43 | class CreateError(Exception): |
| 44 | """Base Create cmd exception.""" |
| 45 | |
| 46 | |
| 47 | class GetEnvAndroidProductOutError(CreateError): |
| 48 | """Can't get client environment ANDROID_PRODUCT_OUT.""" |
| 49 | |
| 50 | |
| 51 | class CheckPathError(CreateError): |
| 52 | """Path does not exist.""" |