From: jeremy-jang <35089715+jeremy-jang@users.noreply.github.com> Date: Tue, 23 Jan 2024 06:41:48 +0000 (+0900) Subject: [Packagemanager] Throw an exception when failed to add event listener (#5886) X-Git-Tag: submit/tizen/20240123.150842~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23bc1444f7ee7d71c4d4c093a364bf3d008e227a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Packagemanager] Throw an exception when failed to add event listener (#5886) * [Packagemanager] Throw an exception when failed to add event listener Signed-off-by: Sangyoon Jang * Fix doxygen comment Signed-off-by: Sangyoon Jang --------- Signed-off-by: Sangyoon Jang --- diff --git a/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs b/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs index 3ad18b83e..45d84fffb 100755 --- a/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs +++ b/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs @@ -72,6 +72,7 @@ namespace Tizen.Applications /// /// InstallProgressChanged event. This event occurs when a package is getting installed and the progress of the request to the package manager is changed. /// + /// Thrown when subscribing to package manager event failed. /// 3 public static event EventHandler InstallProgressChanged { @@ -98,6 +99,7 @@ namespace Tizen.Applications /// /// UninstallProgressChanged event. This event occurs when a package is getting uninstalled and the progress of the request to the package manager is changed. /// + /// Thrown when subscribing to package manager event failed. /// 3 public static event EventHandler UninstallProgressChanged { @@ -124,6 +126,7 @@ namespace Tizen.Applications /// /// UpdateProgressChanged event. This event occurs when a package is getting updated and the progress of the request to the package manager is changed. /// + /// Thrown when subscribing to package manager event failed. /// 3 public static event EventHandler UpdateProgressChanged { @@ -150,6 +153,7 @@ namespace Tizen.Applications /// /// MoveProgressChanged event. This event occurs when a package is getting moved and the progress of the request to the package manager is changed. /// + /// Thrown when subscribing to package manager event failed. /// 3 public static event EventHandler MoveProgressChanged { @@ -176,6 +180,7 @@ namespace Tizen.Applications /// /// ClearDataProgressChanged event. This event occurs when data directories are cleared in the given package. /// + /// Thrown when subscribing to package manager event failed. /// 3 public static event EventHandler ClearDataProgressChanged { @@ -1403,6 +1408,7 @@ namespace Tizen.Applications if (err != Interop.PackageManager.ErrorCode.None) { Log.Warn(LogTag, string.Format("Failed to register callback for package manager event. err = {0}", err)); + throw PackageManagerErrorFactory.GetException(err, "Failed to register package manager event."); } }