geotrellis/geotrellis — pull request #775 by jchien14 (2014-04-07 20:54:08+00:00)
Title: Raster Source LayerID exists method

Three different options I could think of. The layerCount would probably be the most informative (letting you distinguish between ambiguous layer due to unspecified datastore or missing layer) although it isn't the cleanest since you'd have to check for it to be equal to 1 but in the other cases, you'd have to check for the ambiguity again or give the same error message for both ambiguous and non-existing layers.