// Token: 0x06002329 RID: 9001 RVA: 0x000ACAF4 File Offset: 0x000AACF4 internal static void ThrowException(string message, Exception innerException, int lineNumber, int linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType) { if (innerException != null && innerException.Message != null) { StringBuilder stringBuilder = new StringBuilder(message); if (innerException.Message != string.Empty) { stringBuilder.Append(" "); } stringBuilder.Append(innerException.Message); message = stringBuilder.ToString(); } string str = XamlParseException.GenerateErrorMessageContext(lineNumber, linePosition, baseUri, currentXamlObjectIds, objectType); message = message + " " + str; XamlParseException ex; if (innerException is TargetInvocationException && innerException.InnerException is XamlParseException) { ex = (XamlParseException)innerException.InnerException; } else if (lineNumber > 0) { ex = new XamlParseException(message, lineNumber, linePosition, innerException); } else { ex = new XamlParseException(message, innerException); } if (contextXamlObjectIds != null) { ex.NameContext = contextXamlObjectIds.Name; ex.UidContext = contextXamlObjectIds.Uid; ex.KeyContext = contextXamlObjectIds.Key; } ex.BaseUri = baseUri; if (TraceMarkup.IsEnabled) { TraceMarkup.TraceActivityItem(TraceMarkup.ThrowException, ex); } throw ex; }