// namespace.class:function(param, param) (at path/to/file.cs:NNN) void HandleException(string condition, string stackTrace, LogType type) { // Update our render mesh to reflect this exception. if (type == LogType.Exception || type == LogType.Assert) { // This comes from a Unity bug if (condition == "IsFinite(outDistanceForSort)") { return; } // Add new line and make sure we're not over our total amount. ExceptionLine newLine = new ExceptionLine(); newLine.m_Condition = condition; newLine.m_StackTrace = StreamlineStackTrace(stackTrace); newLine.m_Lifetime = m_LineLifetime; m_Lines.Add(newLine); while (m_Lines.Count > m_MaxNumLines) { m_Lines.RemoveAt(0); } // Update text mesh to render all lines. UpdateMeshText(); } }
private void AddException(Exception e) { var item = new ExceptionLine { Message = e.Message, ExceptionType = e.GetType().Name, Source = e.Source, StackTrace = e.StackTrace, TargetSite = e.TargetSite.Name }; this._traceCollection.Insert(0, item); var ie = e.InnerException; if (ie != null) { this.AddException(ie); } }