(PUP-2902) Change error message when attempting to collect classes.

An attempt to collect classes led to an error message that said
that 'class' is not a known resource type (in a way that can be
misinterpreted).

This commit make the error message specific, and clear.