private void ThrowTypeException(Type type, byte header) { throw new MessageTypeException( String.Format( CultureInfo.CurrentCulture, this._source.CanSeek ? "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in position {3:#,0}." : "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in offset {3:#,0}.", type, header, MessagePackCode.ToString(header), this._offset ) ); }
private void ThrowTypeException(Type type, byte header) { long offsetOrPosition; var isRealOffset = this.GetPreviousPosition(out offsetOrPosition); throw new MessageTypeException( String.Format( CultureInfo.CurrentCulture, isRealOffset ? "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in position {3:#,0}." : "Cannot convert '{0}' type value from type '{2}'(0x{1:X}) in offset {3:#,0}.", type, header, MessagePackCode.ToString(header), offsetOrPosition ) ); }