Пример #1
0
        private XamlException CreateException(string message, Exception innerException)
        {
            XamlException ex;

            if (_isWriter)
            {
                ex = new XamlObjectWriterException(message, innerException);
            }
            else
            {
                ex = new XamlObjectReaderException(message, innerException);
            }
            return((LineInfo != null) ? LineInfo.WithLineInfo(ex) : ex);
        }
Пример #2
0
        private XamlException CreateException(string message, Exception innerException)
        {
            XamlException exception;

            if (this._isWriter)
            {
                exception = new XamlObjectWriterException(message, innerException);
            }
            else
            {
                exception = new XamlObjectReaderException(message, innerException);
            }
            if (this.LineInfo == null)
            {
                return(exception);
            }
            return(this.LineInfo.WithLineInfo(exception));
        }