Changeset 158 in code for trunk/downstream.go


Ignore:
Timestamp:
Mar 25, 2020, 11:12:53 PM (5 years ago)
Author:
delthas
Message:

Simplify error handling for downstream JOIN/PART

downstreamConnection.unmarshalEntity already returns an ircError of
command ERR_NOSUCHCHANNEL, so there's no need to explicitly return
another ircError of that type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r156 r158  
    849849                        uc, upstreamName, err := dc.unmarshalEntity(name)
    850850                        if err != nil {
    851                                 return ircError{&irc.Message{
    852                                         Command: irc.ERR_NOSUCHCHANNEL,
    853                                         Params:  []string{name, err.Error()},
    854                                 }}
     851                                return err
    855852                        }
    856853
     
    891888                        uc, upstreamName, err := dc.unmarshalEntity(name)
    892889                        if err != nil {
    893                                 return ircError{&irc.Message{
    894                                         Command: irc.ERR_NOSUCHCHANNEL,
    895                                         Params:  []string{name, err.Error()},
    896                                 }}
     890                                return err
    897891                        }
    898892
Note: See TracChangeset for help on using the changeset viewer.