mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
introduce a dedicated qerr.TransportError and qerr.ApplicationError
This commit is contained in:
parent
ddeb2281fc
commit
592fb9cad9
57 changed files with 845 additions and 521 deletions
|
@ -209,7 +209,10 @@ func (m *streamsMap) DeleteStream(id protocol.StreamID) error {
|
|||
func (m *streamsMap) GetOrOpenReceiveStream(id protocol.StreamID) (receiveStreamI, error) {
|
||||
str, err := m.getOrOpenReceiveStream(id)
|
||||
if err != nil {
|
||||
return nil, qerr.NewError(qerr.StreamStateError, err.Error())
|
||||
return nil, &qerr.TransportError{
|
||||
ErrorCode: qerr.StreamStateError,
|
||||
ErrorMessage: err.Error(),
|
||||
}
|
||||
}
|
||||
return str, nil
|
||||
}
|
||||
|
@ -240,7 +243,10 @@ func (m *streamsMap) getOrOpenReceiveStream(id protocol.StreamID) (receiveStream
|
|||
func (m *streamsMap) GetOrOpenSendStream(id protocol.StreamID) (sendStreamI, error) {
|
||||
str, err := m.getOrOpenSendStream(id)
|
||||
if err != nil {
|
||||
return nil, qerr.NewError(qerr.StreamStateError, err.Error())
|
||||
return nil, &qerr.TransportError{
|
||||
ErrorCode: qerr.StreamStateError,
|
||||
ErrorMessage: err.Error(),
|
||||
}
|
||||
}
|
||||
return str, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue