Bug 1101172: Correct Exception thrown when passing invalid element search type; r=jgriffin

--HG--
extra : rebase_source : 8da9313980a4895b72dcff1f2e46efe241a14c26