better diagnostics if unsupported ChannelOption set (#12)

Motivation:

If the user sets an unsupported ChannelOption we should give the best
diagnostics possible.

Modifications:

Add the ChannelOption type to the error message that it's unsupported.

Result:

Happier users
This commit is contained in:
Johannes Weiss 2018-11-09 17:15:35 +00:00 committed by Cory Benfield
parent a9cece8a6d
commit 833b152a21
1 changed files with 2 additions and 2 deletions

View File

@ -305,7 +305,7 @@ extension NIOTSConnectionChannel: Channel {
self.pipeline.fireChannelWritabilityChanged()
}
default:
fatalError("option \(option) not supported")
fatalError("option \(type(of: option)).\(option) not supported")
}
}
@ -346,7 +346,7 @@ extension NIOTSConnectionChannel: Channel {
case _ as WriteBufferWaterMarkOption:
return self.backpressureManager.waterMarks as! T.OptionType
default:
fatalError("option \(option) not supported")
fatalError("option \(type(of: option)).\(option) not supported")
}
}
}