better exception on getParameters