From: kilig Date: Tue, 22 Aug 2023 02:28:54 +0000 (+0900) Subject: Fix issue for checking return value of Interop (#5491) X-Git-Tag: accepted/tizen/unified/20231205.024657~190 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=268f1cc42c187b7d048c02579f0a1fd9e80ffa72;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Fix issue for checking return value of Interop (#5491) Signed-off-by: Inkyun Kil --- diff --git a/src/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs b/src/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs index 1354735..72f95f1 100755 --- a/src/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs +++ b/src/Tizen.Applications.RemoteView/Tizen.Applications/RemoteView.cs @@ -124,31 +124,34 @@ namespace Tizen.Applications internal static void CheckException(Interop.WidgetViewerEvas.ErrorCode err) { - switch (err) + if (err != Interop.WidgetViewerEvas.ErrorCode.None) { - case Interop.WidgetViewerEvas.ErrorCode.Fault: - throw new InvalidOperationException("Fault at unmanaged code"); + switch (err) + { + case Interop.WidgetViewerEvas.ErrorCode.Fault: + throw new InvalidOperationException("Fault at unmanaged code"); - case Interop.WidgetViewerEvas.ErrorCode.PermissionDenied: - throw new UnauthorizedAccessException(); + case Interop.WidgetViewerEvas.ErrorCode.PermissionDenied: + throw new UnauthorizedAccessException(); - case Interop.WidgetViewerEvas.ErrorCode.NotSupported: - throw new NotSupportedException(); + case Interop.WidgetViewerEvas.ErrorCode.NotSupported: + throw new NotSupportedException(); - case Interop.WidgetViewerEvas.ErrorCode.InvalidParameter: - throw new InvalidOperationException("Invalid parameter error at unmanaged code"); + case Interop.WidgetViewerEvas.ErrorCode.InvalidParameter: + throw new InvalidOperationException("Invalid parameter error at unmanaged code"); - case Interop.WidgetViewerEvas.ErrorCode.AlreadyExist: - throw new InvalidOperationException("Already exist"); + case Interop.WidgetViewerEvas.ErrorCode.AlreadyExist: + throw new InvalidOperationException("Already exist"); - case Interop.WidgetViewerEvas.ErrorCode.MaxExceeded: - throw new InvalidOperationException("Max exceeded"); + case Interop.WidgetViewerEvas.ErrorCode.MaxExceeded: + throw new InvalidOperationException("Max exceeded"); - case Interop.WidgetViewerEvas.ErrorCode.Disabled: - throw new InvalidOperationException("Disabled"); + case Interop.WidgetViewerEvas.ErrorCode.Disabled: + throw new InvalidOperationException("Disabled"); - default: - throw new InvalidOperationException("Invalid Operation"); + default: + throw new InvalidOperationException("Invalid Operation"); + } } }