Changing parameters to exceptions