コード例 #1
0
        private static int DoSet(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderAvOpenhomeOrgExakt2 self = (DvProviderAvOpenhomeOrgExakt2)gch.Target;
            DvInvocation invocation            = new DvInvocation(aInvocation);
            string       deviceId;
            uint         bankId;
            string       fileUri;
            bool         mute;
            bool         persist;

            try
            {
                invocation.ReadStart();
                deviceId = invocation.ReadString("DeviceId");
                bankId   = invocation.ReadUint("BankId");
                fileUri  = invocation.ReadString("FileUri");
                mute     = invocation.ReadBool("Mute");
                persist  = invocation.ReadBool("Persist");
                invocation.ReadEnd();
                self.Set(invocation, deviceId, bankId, fileUri, mute, persist);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "Set");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", "Set"));
                return(-1);
            }
            catch (Exception e)
            {
                Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Set", e.TargetSite.Name);
                Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Set", e.TargetSite.Name);
                Console.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
コード例 #2
0
        private static int DoSetAccount(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderAvOpenhomeOrgPins1 self = (DvProviderAvOpenhomeOrgPins1)gch.Target;
            DvInvocation invocation           = new DvInvocation(aInvocation);
            uint         index;
            string       mode;
            string       type;
            string       uri;
            string       title;
            string       description;
            string       artworkUri;
            bool         shuffle;

            try
            {
                invocation.ReadStart();
                index       = invocation.ReadUint("Index");
                mode        = invocation.ReadString("Mode");
                type        = invocation.ReadString("Type");
                uri         = invocation.ReadString("Uri");
                title       = invocation.ReadString("Title");
                description = invocation.ReadString("Description");
                artworkUri  = invocation.ReadString("ArtworkUri");
                shuffle     = invocation.ReadBool("Shuffle");
                invocation.ReadEnd();
                self.SetAccount(invocation, index, mode, type, uri, title, description, artworkUri, shuffle);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "SetAccount");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "SetAccount" }));
                return(-1);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetAccount" });
                System.Diagnostics.Debug.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetAccount" });
                System.Diagnostics.Debug.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
コード例 #3
0
        private static int DoSetAssociated(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderLinnCoUkCloud1 self       = (DvProviderLinnCoUkCloud1)gch.Target;
            DvInvocation             invocation = new DvInvocation(aInvocation);

            byte[] aesKeyRsaEncrypted;
            byte[] initVectorRsaEncrypted;
            byte[] tokenAesEncrypted;
            bool   associated;

            try
            {
                invocation.ReadStart();
                aesKeyRsaEncrypted     = invocation.ReadBinary("AesKeyRsaEncrypted");
                initVectorRsaEncrypted = invocation.ReadBinary("InitVectorRsaEncrypted");
                tokenAesEncrypted      = invocation.ReadBinary("TokenAesEncrypted");
                associated             = invocation.ReadBool("Associated");
                invocation.ReadEnd();
                self.SetAssociated(invocation, aesKeyRsaEncrypted, initVectorRsaEncrypted, tokenAesEncrypted, associated);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "SetAssociated");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "SetAssociated" }));
                return(-1);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetAssociated" });
                System.Diagnostics.Debug.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetAssociated" });
                System.Diagnostics.Debug.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
コード例 #4
0
        private static int DoSetEnabled(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderAvOpenhomeOrgCredentials1 self = (DvProviderAvOpenhomeOrgCredentials1)gch.Target;
            DvInvocation invocation = new DvInvocation(aInvocation);
            string       id;
            bool         enabled;

            try
            {
                invocation.ReadStart();
                id      = invocation.ReadString("Id");
                enabled = invocation.ReadBool("Enabled");
                invocation.ReadEnd();
                self.SetEnabled(invocation, id, enabled);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "SetEnabled");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "SetEnabled" }));
                return(-1);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetEnabled" });
                System.Diagnostics.Debug.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetEnabled" });
                System.Diagnostics.Debug.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
コード例 #5
0
        private static int DoSetEnabled(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderAvOpenhomeOrgCredentials1 self = (DvProviderAvOpenhomeOrgCredentials1)gch.Target;
            DvInvocation invocation = new DvInvocation(aInvocation);
            string       id;
            bool         enabled;

            try
            {
                invocation.ReadStart();
                id      = invocation.ReadString("Id");
                enabled = invocation.ReadBool("Enabled");
                invocation.ReadEnd();
                self.SetEnabled(invocation, id, enabled);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "SetEnabled");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", "SetEnabled"));
                return(-1);
            }
            catch (Exception e)
            {
                Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetEnabled", e.TargetSite.Name);
                Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetEnabled", e.TargetSite.Name);
                Console.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
コード例 #6
0
        private static int DoSetTarget(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderUpnpOrgSwitchPower1 self = (DvProviderUpnpOrgSwitchPower1)gch.Target;
            DvInvocation invocation            = new DvInvocation(aInvocation);
            bool         newTargetValue;

            try
            {
                invocation.ReadStart();
                newTargetValue = invocation.ReadBool("newTargetValue");
                invocation.ReadEnd();
                self.SetTarget(invocation, newTargetValue);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "SetTarget");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "SetTarget" }));
                return(-1);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetTarget" });
                System.Diagnostics.Debug.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetTarget" });
                System.Diagnostics.Debug.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
コード例 #7
0
        private static int DoSetTarget(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderUpnpOrgSwitchPower1 self = (DvProviderUpnpOrgSwitchPower1)gch.Target;
            DvInvocation invocation            = new DvInvocation(aInvocation);
            bool         newTargetValue;

            try
            {
                invocation.ReadStart();
                newTargetValue = invocation.ReadBool("newTargetValue");
                invocation.ReadEnd();
                self.SetTarget(invocation, newTargetValue);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "SetTarget");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", "SetTarget"));
                return(-1);
            }
            catch (Exception e)
            {
                Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetTarget", e.TargetSite.Name);
                Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetTarget", e.TargetSite.Name);
                Console.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
コード例 #8
0
 private static int DoSetMute(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgRenderingControl2 self = (DvProviderUpnpOrgRenderingControl2)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint instanceID;
     string channel;
     bool desiredMute;
     try
     {
         invocation.ReadStart();
         instanceID = invocation.ReadUint("InstanceID");
         channel = invocation.ReadString("Channel");
         desiredMute = invocation.ReadBool("DesiredMute");
         invocation.ReadEnd();
         self.SetMute(invocation, instanceID, channel, desiredMute);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "SetMute");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "SetMute"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetMute", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetMute", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
コード例 #9
0
 private static int DoSetLoudness(IntPtr aPtr, IntPtr aInvocation, uint aVersion)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgRenderingControl1 self = (DvProviderUpnpOrgRenderingControl1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint instanceID;
     string channel;
     bool desiredLoudness;
     try
     {
         invocation.ReadStart();
         instanceID = invocation.ReadUint("InstanceID");
         channel = invocation.ReadString("Channel");
         desiredLoudness = invocation.ReadBool("DesiredLoudness");
         invocation.ReadEnd();
         self.SetLoudness(aVersion, instanceID, channel, desiredLoudness);
     }
     catch (ActionError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError can be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
         System.Diagnostics.Process.GetCurrentProcess().Kill();
     }
     return 0;
 }
コード例 #10
0
 private static int DoSetTarget(IntPtr aPtr, IntPtr aInvocation, uint aVersion)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderUpnpOrgSwitchPower1 self = (DvProviderUpnpOrgSwitchPower1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     bool newTargetValue;
     try
     {
         invocation.ReadStart();
         newTargetValue = invocation.ReadBool("newTargetValue");
         invocation.ReadEnd();
         self.SetTarget(aVersion, newTargetValue);
     }
     catch (ActionError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, "Invalid XML");
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError can be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2}", e.GetType(), e.Message, e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
         System.Diagnostics.Process.GetCurrentProcess().Kill();
     }
     return 0;
 }
コード例 #11
0
 private static int DoSetStandby(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderAvOpenhomeOrgProduct1 self = (DvProviderAvOpenhomeOrgProduct1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     bool value;
     try
     {
         invocation.ReadStart();
         value = invocation.ReadBool("Value");
         invocation.ReadEnd();
         self.SetStandby(invocation, value);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "SetStandby");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "SetStandby" }));
         return -1;
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetStandby" });
         System.Diagnostics.Debug.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetStandby" });
         System.Diagnostics.Debug.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
コード例 #12
0
 private static int DoSet(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderAvOpenhomeOrgExakt2 self = (DvProviderAvOpenhomeOrgExakt2)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     string deviceId;
     uint bankId;
     string fileUri;
     bool mute;
     bool persist;
     try
     {
         invocation.ReadStart();
         deviceId = invocation.ReadString("DeviceId");
         bankId = invocation.ReadUint("BankId");
         fileUri = invocation.ReadString("FileUri");
         mute = invocation.ReadBool("Mute");
         persist = invocation.ReadBool("Persist");
         invocation.ReadEnd();
         self.Set(invocation, deviceId, bankId, fileUri, mute, persist);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "Set");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "Set"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Set", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "Set", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
コード例 #13
0
 private static int DoSetMultiple(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderOpenhomeOrgTestBasic1 self = (DvProviderOpenhomeOrgTestBasic1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     uint valueUint;
     int valueInt;
     bool valueBool;
     try
     {
         invocation.ReadStart();
         valueUint = invocation.ReadUint("ValueUint");
         valueInt = invocation.ReadInt("ValueInt");
         valueBool = invocation.ReadBool("ValueBool");
         invocation.ReadEnd();
         self.SetMultiple(invocation, valueUint, valueInt, valueBool);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "SetMultiple");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "SetMultiple"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetMultiple", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetMultiple", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }
コード例 #14
0
 private static int DoSetEnabled(IntPtr aPtr, IntPtr aInvocation)
 {
     GCHandle gch = GCHandle.FromIntPtr(aPtr);
     DvProviderAvOpenhomeOrgCredentials1 self = (DvProviderAvOpenhomeOrgCredentials1)gch.Target;
     DvInvocation invocation = new DvInvocation(aInvocation);
     string id;
     bool enabled;
     try
     {
         invocation.ReadStart();
         id = invocation.ReadString("Id");
         enabled = invocation.ReadBool("Enabled");
         invocation.ReadEnd();
         self.SetEnabled(invocation, id, enabled);
     }
     catch (ActionError e)
     {
         invocation.ReportActionError(e, "SetEnabled");
         return -1;
     }
     catch (PropertyUpdateError)
     {
         invocation.ReportError(501, String.Format("Invalid value for property {0}", "SetEnabled"));
         return -1;
     }
     catch (Exception e)
     {
         Console.WriteLine("WARNING: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetEnabled", e.TargetSite.Name);
         Console.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
         return -1;
     }
     try
     {
         invocation.WriteStart();
         invocation.WriteEnd();
     }
     catch (ActionError)
     {
         return -1;
     }
     catch (System.Exception e)
     {
         Console.WriteLine("ERROR: unexpected exception {0}(\"{1}\") thrown by {2} in {3}", e.GetType(), e.Message, "SetEnabled", e.TargetSite.Name);
         Console.WriteLine("       Only ActionError can be thrown by action response writer");
     }
     return 0;
 }