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, ///< invalid widget package
39 ErrorWidgetDoesNotExist, ///< given tizenAppId is invalid, no app
40 ErrorAreadyUninstalling, ///< Widget is already being uninstalled
41 ErrorInvalidPackage, ///< Widget signature is invalid.
42 ErrorInternal, ///< Internal error due to inconsistency
43 ErrorNotAllowed, ///< Widget installation or update not
45 ///< because violation of policy ocurred
46 ErrorDeferred, ///< Widget installation was deferred and
47 // will be continued when possible
48 ErrorDatabaseFailure, ///< Failure in database
49 ErrorRemovingFolderFailure, ///< Failure in removing existing widget
51 ErrorCreateVconfFailure, ///< Failure in creating vconf
52 ErrorInstallOspServcie, ///< Failure in installing osp service
53 ErrorUpdateWidget, ///< Failure in widget update.
54 ErrorInstallToExt, ///< Failure in install to sdcard
55 ErrorUnknown ///< Temporary error. Try to not use this.
58 DECLARE_JOB_EXCEPTION_BASE(JobExceptionBase, Base, ErrorUnknown)
61 DECLARE_JOB_EXCEPTION(Base, NotAllowed, ErrorNotAllowed)
62 DECLARE_JOB_EXCEPTION(Base, Deferred, ErrorDeferred)
65 DECLARE_JOB_EXCEPTION(Base, OpenZipFailed, ErrorInvalidWidgetPackage)
66 DECLARE_JOB_EXCEPTION(Base, ZipEmpty, ErrorInvalidWidgetPackage)
67 DECLARE_JOB_EXCEPTION(Base, ExtractFileFailed, ErrorInvalidWidgetPackage)
68 DECLARE_JOB_EXCEPTION(Base, InternalError, ErrorInternal)
71 DECLARE_JOB_EXCEPTION(Base, InvalidPackage, ErrorInvalidPackage)
74 DECLARE_JOB_EXCEPTION(Base, WidgetConfigFileInvalid, ErrorInvalidWidgetPackage)
75 DECLARE_JOB_EXCEPTION(Base, InstallationFailed, ErrorInvalidWidgetPackage)
76 DECLARE_JOB_EXCEPTION(Base, UnknownError, ErrorUnknown)
77 DECLARE_JOB_EXCEPTION(Base, DatabaseFailure, ErrorDatabaseFailure)
78 DECLARE_JOB_EXCEPTION(Base, RemovingFolderFailure, ErrorRemovingFolderFailure)
79 DECLARE_JOB_EXCEPTION(Base, RemovingFileFailure, ErrorRemovingFolderFailure)
80 DECLARE_JOB_EXCEPTION(Base, CreateVconfFailure, ErrorCreateVconfFailure)
82 DECLARE_JOB_EXCEPTION(Base, CopyIconFailed, ErrorUnknown)
84 DECLARE_JOB_EXCEPTION(Base, ErrorExternalInstallingFailure, ErrorInstallToExt)
86 // Installation osp service
87 DECLARE_JOB_EXCEPTION(Base, InstallOspsvcFailed, ErrorInstallOspServcie)
89 DECLARE_JOB_EXCEPTION(Base, BackupFailed, ErrorUpdateWidget)
90 DECLARE_JOB_EXCEPTION(Base, InsertNewWidgetFailed, ErrorUpdateWidget)
91 DECLARE_JOB_EXCEPTION(Base, RemoveBackupFailed, ErrorUpdateWidget)
94 DECLARE_JOB_EXCEPTION(Base, UpdateFailed, ErrorInvalidWidgetPackage)
96 // Plugins copy errors
97 DECLARE_JOB_EXCEPTION(Base, EmptyPluginsDirectory, ErrorInvalidWidgetPackage)
98 DECLARE_JOB_EXCEPTION(Base, PluginsSubdirectory, ErrorInvalidWidgetPackage)
100 DECLARE_JOB_EXCEPTION(Base, SetCertificateInfoFailed, ErrorUnknown)
105 #endif /* INSTALLER_ERRORS_H_ */