Exemplo n.º 1
0
        public void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception)
        {
            //Log.Logger.Error(
            //    messageTemplate: exception.Message,
            //    exception: exception);

            Debugger.Break();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Checks for a static method, signed with the ErrorHandlerAttribute and call them if its available
        /// </summary>
        /// <param name="type">type information for the class wtih static method </param>
        /// <param name="methodKind">origin method where the error comes from</param>
        /// <param name="exception">occured exception</param>
        private static void RaiseStaticErrorHandlerMethod(Type type, RegisterErrorMethodKind methodKind, NetRunTimeSystem.Exception exception)
        {
            MethodInfo errorMethod = AttributeHelper.GetRegisterErrorMethod(type);

            if (null != errorMethod)
            {
                errorMethod.Invoke(null, new object[] { methodKind, exception });
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Checks for a static method, signed with the ErrorHandlerAttribute and call them if its available
        /// </summary>
        /// <param name="type">type information for the class with static method </param>
        /// <param name="methodKind">origin method where the error comes from</param>
        /// <param name="exception">occured exception</param>
        /// <returns>true if error is handled by derived method and we can proceed</returns>
        public static bool RaiseStaticErrorHandlerMethod(Type type, RegisterErrorMethodKind methodKind, System.Exception exception)
        {
            MethodInfo errorMethod = AttributeReflector.GetRegisterErrorMethod(type);

            if (null != errorMethod)
            {
                try
                {
                    object          result         = null;
                    ParameterInfo[] arguments      = errorMethod.GetParameters();
                    int             argumentsCount = arguments.Length;
                    switch (argumentsCount)
                    {
                    case 0:
                        result = errorMethod.Invoke(null, new object[0]);
                        break;

                    case 1:
                        if (arguments[0].ParameterType.GUID == typeof(RegisterErrorMethodKind).GUID)
                        {
                            result = errorMethod.Invoke(null, new object[] { methodKind });
                        }
                        else
                        {
                            result = errorMethod.Invoke(null, new object[] { exception });
                        }
                        break;

                    case 2:
                        result = errorMethod.Invoke(null, new object[] { methodKind, exception });
                        break;

                    case 3:
                        result = errorMethod.Invoke(null, new object[] { type, methodKind, exception });
                        break;

                    default:
                        break;
                    }

                    if (result is bool)
                    {
                        return((bool)result);
                    }
                }
                catch (Exception throwedException)
                {
                    Console.WriteLine("Unable to call addin register error method. {0}", throwedException.Message);
                }
            }
            return(false);
        }
Exemplo n.º 4
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception)
 {
     MessageBox.Show("An error occurend in " + methodKind.ToString(), "ExtendedPPointCS4.Addin");
 }
Exemplo n.º 5
0
        /// <summary>
        /// Checks for a static method, signed with the ErrorHandlerAttribute and call them if its available
        /// </summary>
        /// <param name="type">type information for the class wtih static method </param>
       /// <param name="methodKind">origin method where the error comes from</param>
        /// <param name="exception">occured exception</param>
        private static void RaiseStaticErrorHandlerMethod(Type type, RegisterErrorMethodKind methodKind, NetRuntimeSystem.Exception exception)
        {
			MethodInfo errorMethod = AttributeHelper.GetRegisterErrorMethod(type);
            if (null != errorMethod)
                errorMethod.Invoke(null, new object[] { methodKind, exception });
        }
Exemplo n.º 6
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, System.Exception exception)
 {
     MessageBox.Show("An error occurend in " + methodKind.ToString(), "ExtendedOutlookCS35.Addin");
 }
Exemplo n.º 7
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception)
 {
     MessageBox.Show("An register error occurend in " + methodKind.ToString(), "SuperAddinCS4");
 }
Exemplo n.º 8
0
 public static bool RegisterError(RegisterErrorMethodKind methodKind, Exception exception)
 {
     MessageDialog.ShowRegisterError(methodKind, exception, "Point");
     return(true);
 }
Exemplo n.º 9
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception)
 {
     MessageBox.Show("An error occurend in " + methodKind.ToString(), "ExtendedAccessCS4.Addin");
 }
Exemplo n.º 10
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception)
 {
     MessageBox.Show($"Registration error in {methodKind}: {exception.Message}", ADDIN_TITLE);
 }
Exemplo n.º 11
0
 private static void RegisterError(RegisterErrorMethodKind methodKind, Exception exception)
 {
     NetOffice.Settings.Default.MessageFilter.Enabled = true;
     MessageDialog.ShowRegisterError(methodKind, exception, "Excel");
 }
Exemplo n.º 12
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, System.Exception exception)
 {
     MessageBox.Show("An error occurend in " + methodKind.ToString(), "Lightsaber");
 }
Exemplo n.º 13
0
        public static void ShowRegisterError(RegisterErrorMethodKind methodKind, Exception exception, string from)
        {
            string text = String.Format("Method:{0}{2}{2}{1}", methodKind, exception, Environment.NewLine);

            MessageBox.Show(text, "Reg/Unreg Error " + from);
        }
Exemplo n.º 14
0
 private static void RegisterError(RegisterErrorMethodKind methodKind, Exception exception)
 {
     NetOffice.Settings.Default.MessageFilter.Enabled = true;           
     MessageDialog.ShowRegisterError(methodKind, exception, "Excel");
 }
Exemplo n.º 15
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception)
 {
     MessageBox.Show("An register error occurend in " + methodKind.ToString(), "CDP4-CE.Addin");
 }
Exemplo n.º 16
0
 private static void RegisterError(RegisterErrorMethodKind methodKind, Exception exception)
 {
     Office.Tools.Contribution.DialogUtils.ShowRegisterError("Excel06AddinCS4", methodKind, exception);
 }
Exemplo n.º 17
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, System.Exception exception)
 {
     MessageBox.Show("An error occurend in " + methodKind.ToString(), "ToulinTryNetOfficeAddin");
 }
Exemplo n.º 18
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception)
 {
     MessageBox.Show("An error occurend in " + methodKind.ToString(), "COMAddinNetOfficeToolsExCS2.AccessSampleAddin");
 }
Exemplo n.º 19
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, System.Exception exception)
 {
     Office.Tools.Contribution.DialogUtils.ShowRegisterError("InnerAddin", methodKind, exception);
 }
Exemplo n.º 20
0
 public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception)
 {
     MessageBox.Show(methodKind + Environment.NewLine + exception.Message);
 }
Exemplo n.º 21
0
 public static void ShowRegisterError(RegisterErrorMethodKind methodKind, Exception exception, string from)
 {
     string text = String.Format("Method:{0}{2}{2}{1}", methodKind, exception, Environment.NewLine);
     MessageBox.Show(text, "Reg/Unreg Error " + from);
 }