2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file installer_errors.h
18 * @author Pawel Sikorski (p.sikorski@samgsung.com)
23 #ifndef INSTALLER_ERRORS_H_
24 #define INSTALLER_ERRORS_H_
26 #include <dpl/exception.h>
27 #include <job_exception_base.h>
29 //TODO SafeException(...)
32 namespace WidgetInstall {
33 namespace Exceptions {
38 ErrorInvalidWidgetPackage, ///< ?
39 ErrorWidgetDoesNotExist, ///< ?
40 ErrorAreadyUninstalling, ///< Widget is already being uninstalled
41 ErrorOutOfDiskSpace, ///< ?
42 ErrorInvalidPackage, ///< Widget signature is invalid.
43 ErrorAlreadyInstalled, ///< ?
45 ErrorNotAllowed, ///< Widget installation or update not allowed
46 ///< because violation of policy ocurred
47 ErrorDeferred, ///< Widget installation was deferred and will be continued when possible
48 ErrorDatabaseFailure, ///< Failure in database
49 ErrorRemovingFolderFailure, ///< Failure in removing existing widget folder
50 ErrorCreateVconfFailure, ///< Failure in creating vconf
51 ErrorInstallOspServcie, ///< Failure in installing osp service
52 ErrorUpdateWidget, ///< Failure in widget update.
53 ErrorInstallToExt, ///< Failure in install to sdcard
54 ErrorUnknown ///< Temporary error. Try to not use this.
57 DECLARE_JOB_EXCEPTION_BASE(JobExceptionBase, Base, ErrorUnknown)
60 DECLARE_JOB_EXCEPTION(Base, NotAllowed, ErrorNotAllowed)
61 DECLARE_JOB_EXCEPTION(Base, Deferred, ErrorDeferred)
62 DECLARE_JOB_EXCEPTION(Base, InvalidWidgetUrl, ErrorInvalidWidgetPackage)
65 DECLARE_JOB_EXCEPTION(Base, OpenZipFailed, ErrorInvalidWidgetPackage)
66 DECLARE_JOB_EXCEPTION(Base, GetZipGlobalInfoFailed, ErrorInvalidWidgetPackage)
67 DECLARE_JOB_EXCEPTION(Base, ZipEmpty, ErrorInvalidWidgetPackage)
68 DECLARE_JOB_EXCEPTION(Base, GetZippedFileInfoFailed, ErrorInvalidWidgetPackage)
69 DECLARE_JOB_EXCEPTION(Base, ZippedFileVersionTooNew, ErrorInvalidWidgetPackage)
70 DECLARE_JOB_EXCEPTION(Base, ExtractFileFailed, ErrorInvalidWidgetPackage)
71 DECLARE_JOB_EXCEPTION(Base, OutOfDiskSpace, ErrorOutOfDiskSpace)
72 DECLARE_JOB_EXCEPTION(Base, InternalError, ErrorInternal)
75 DECLARE_JOB_EXCEPTION(Base, InvalidPackage, ErrorInvalidPackage)
78 DECLARE_JOB_EXCEPTION(Base, WidgetConfigFileInvalid, ErrorInvalidWidgetPackage)
79 DECLARE_JOB_EXCEPTION(Base, NotInstalled, ErrorInvalidWidgetPackage)
80 DECLARE_JOB_EXCEPTION(Base, InstallationFailed, ErrorInvalidWidgetPackage)
81 DECLARE_JOB_EXCEPTION(Base, AlreadyInstalled, ErrorAlreadyInstalled)
82 DECLARE_JOB_EXCEPTION(Base, UnknownError, ErrorUnknown)
83 DECLARE_JOB_EXCEPTION(Base, DatabaseFailure, ErrorDatabaseFailure)
84 DECLARE_JOB_EXCEPTION(Base, RemovingFolderFailure, ErrorRemovingFolderFailure)
85 DECLARE_JOB_EXCEPTION(Base, CreateVconfFailure, ErrorCreateVconfFailure)
87 DECLARE_JOB_EXCEPTION(Base, CopyIconFailed, ErrorUnknown)
89 DECLARE_JOB_EXCEPTION(Base, ErrorExternalInstallingFailure, ErrorInstallToExt)
91 // Installation osp service
92 DECLARE_JOB_EXCEPTION(Base, RequestInstallOspsvc, ErrorInstallOspServcie)
93 DECLARE_JOB_EXCEPTION(Base, InstallOspsvcFailed, ErrorInstallOspServcie)
95 DECLARE_JOB_EXCEPTION(Base, BackupFailed, ErrorUpdateWidget)
96 DECLARE_JOB_EXCEPTION(Base, InsertNewWidgetFailed, ErrorUpdateWidget)
97 DECLARE_JOB_EXCEPTION(Base, RemoveBackupFailed, ErrorUpdateWidget)
100 DECLARE_JOB_EXCEPTION(Base, UpdateFailed, ErrorInvalidWidgetPackage)
102 // Plugins copy errors
103 DECLARE_JOB_EXCEPTION(Base, EmptyPluginsDirectory, ErrorInvalidWidgetPackage)
104 DECLARE_JOB_EXCEPTION(Base, PluginsSubdirectory, ErrorInvalidWidgetPackage)
106 DECLARE_JOB_EXCEPTION(Base, SetCertificateInfoFailed, ErrorUnknown)
112 #endif /* INSTALLER_ERRORS_H_ */