ThrowExceptionAndWarning() private method

private ThrowExceptionAndWarning ( System.Data.SqlClient.TdsParserStateObject stateObj, bool callerHasConnectionLock = false, bool asyncClose = false ) : void
stateObj System.Data.SqlClient.TdsParserStateObject
callerHasConnectionLock bool
asyncClose bool
return void
 internal TdsParserStateObject(TdsParser parser, SNIHandle physicalConnection, bool async)
 {
     this._objectID = Interlocked.Increment(ref _objectTypeCount);
     this._owner = new WeakReference(null);
     this._inputHeaderLen = 8;
     this._outputHeaderLen = 8;
     this._outBytesUsed = 8;
     this._outputPacketNumber = 1;
     this._bTmp = new byte[12];
     this._parser = parser;
     this.SniContext = System.Data.SqlClient.SniContext.Snix_GetMarsSession;
     this.SetPacketSize(this._parser._physicalStateObj._outBuff.Length);
     SNINativeMethodWrapper.ConsumerInfo myInfo = this.CreateConsumerInfo(async);
     this._sessionHandle = new SNIHandle(myInfo, "session:", physicalConnection);
     if (this._sessionHandle.Status != 0)
     {
         parser.Errors.Add(parser.ProcessSNIError(this));
         parser.ThrowExceptionAndWarning();
     }
     this.IncrementPendingCallbacks();
 }