Microsoft.HockeyApp.Extensibility.Implementation.External.ExceptionDetails.CreateWithoutStackInfo C# (CSharp) Method

CreateWithoutStackInfo() static private method

Creates a new instance of ExceptionDetails from a System.Exception and a parent ExceptionDetails.
static private CreateWithoutStackInfo ( Exception exception, ExceptionDetails parentExceptionDetails ) : ExceptionDetails
exception Exception
parentExceptionDetails ExceptionDetails
return ExceptionDetails
        internal static ExceptionDetails CreateWithoutStackInfo(Exception exception, ExceptionDetails parentExceptionDetails)
        {
            if (exception == null)
            {
                throw new ArgumentNullException("exception");
            }

            var exceptionDetails = new External.ExceptionDetails()
            {
                id = exception.GetHashCode(),
                typeName = exception.GetType().FullName,
                message = exception.Message
            };

            if (parentExceptionDetails != null)
            {
                exceptionDetails.outerId = parentExceptionDetails.id;
            }

            return exceptionDetails;
        }
    }