ArtemisComm.Proxy.UI.SQLLogger.PacketToLogging.AddException C# (CSharp) Method

AddException() public method

public AddException ( System.Guid sourceID, Exception error ) : void
sourceID System.Guid
error System.Exception
return void
        public void AddException(Guid sourceID, Exception error)
        {
            if (error != null)
            {
                lock (lockingObject2)
                {
                    using (SqlCommand cmd =
                           new SqlCommand("INSERT INTO Exceptions (SourceID, Message, StackTrace, ExceptionType) "
                           + "VALUES (@SourceID, @Message, @StackTrace, @ExceptionType);",
                           ActiveConnection))
                    {
                        cmd.Parameters.AddWithValue("@SourceID", sourceID.ToString());
                        cmd.Parameters.AddWithValue("@Message", error.Message);
                        cmd.Parameters.AddWithValue("@StackTrace", error.StackTrace);
                        cmd.Parameters.AddWithValue("@ExceptionType", error.GetType().ToString());
                        cmd.ExecuteNonQuery();
                    }
                }
            }
        }
        SqlConnection GetConnection()