elcuervo/airplay — pull request #61 by sodabrew (2013-11-19 12:38:33+00:00)
Title: Add exception class Airplay::Error::UnsupportedType

This replaces use of TypeError with an exception under the Airplay namespace.

I don't think this was the right way to use TypeError, because in several cases the target variable is a String with different encodings or contents. Typically a TypeError is raised in case of using e.g. a String when an Integer is expected.

That said... the original code is growing on me. One could pass an IO object and that would work, whereas an Integer would fail, and so TypeError makes sense.