public void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception) { //Log.Logger.Error( // messageTemplate: exception.Message, // exception: exception); Debugger.Break(); }
/// <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 }); } }
/// <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); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception) { MessageBox.Show("An error occurend in " + methodKind.ToString(), "ExtendedPPointCS4.Addin"); }
/// <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 }); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, System.Exception exception) { MessageBox.Show("An error occurend in " + methodKind.ToString(), "ExtendedOutlookCS35.Addin"); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception) { MessageBox.Show("An register error occurend in " + methodKind.ToString(), "SuperAddinCS4"); }
public static bool RegisterError(RegisterErrorMethodKind methodKind, Exception exception) { MessageDialog.ShowRegisterError(methodKind, exception, "Point"); return(true); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception) { MessageBox.Show("An error occurend in " + methodKind.ToString(), "ExtendedAccessCS4.Addin"); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception) { MessageBox.Show($"Registration error in {methodKind}: {exception.Message}", ADDIN_TITLE); }
private static void RegisterError(RegisterErrorMethodKind methodKind, Exception exception) { NetOffice.Settings.Default.MessageFilter.Enabled = true; MessageDialog.ShowRegisterError(methodKind, exception, "Excel"); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, System.Exception exception) { MessageBox.Show("An error occurend in " + methodKind.ToString(), "Lightsaber"); }
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); }
private static void RegisterError(RegisterErrorMethodKind methodKind, Exception exception) { NetOffice.Settings.Default.MessageFilter.Enabled = true; MessageDialog.ShowRegisterError(methodKind, exception, "Excel"); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception) { MessageBox.Show("An register error occurend in " + methodKind.ToString(), "CDP4-CE.Addin"); }
private static void RegisterError(RegisterErrorMethodKind methodKind, Exception exception) { Office.Tools.Contribution.DialogUtils.ShowRegisterError("Excel06AddinCS4", methodKind, exception); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, System.Exception exception) { MessageBox.Show("An error occurend in " + methodKind.ToString(), "ToulinTryNetOfficeAddin"); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception) { MessageBox.Show("An error occurend in " + methodKind.ToString(), "COMAddinNetOfficeToolsExCS2.AccessSampleAddin"); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, System.Exception exception) { Office.Tools.Contribution.DialogUtils.ShowRegisterError("InnerAddin", methodKind, exception); }
public static void RegisterErrorHandler(RegisterErrorMethodKind methodKind, Exception exception) { MessageBox.Show(methodKind + Environment.NewLine + exception.Message); }
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); }