My current client has an existing exception management library that they'd like me to use on this project. This library sends the exception information via mail to a list of users. I'd like to attach this to the Process Exception handler, but I'm not sure where to get the actual exception that occurred. The K2.ExceptionObject doesn't appear to derive from System.Exception. I've attached a sample of what I'm attempting to accomplish. Am I just missing something completely?
#region - K2 Context -
private HostContext _K2;
[EditorBrowsable(EditorBrowsableState.Never)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public HostContext K2
{
get { return _K2; }
set { _K2 = value; }
}
#endregion
#region - Properties_ExecuteCode -
private void Properties_ExecuteCode(object sender, EventArgs e)
{
K2.AddToErrorLog = K2.Configuration.IsErrorLog;
K2.AddToServerLog = K2.Configuration.IsServerLog;
ClientLibrary.ErrorHandler handler = new ClientLibrary.ErrorHandler(K2.ExceptionObject, null); /***** This line doesn't build *****/
handler.SendException();
}
#endregion