Make panic messages more informative

Let the client know whic parameter was incorrect.