dbpfindexp/dynamic-logs — pull request #1 by burtbeckwith (2014-12-07 01:05:53+00:00)
Title: cleanup

You don't own the dynamiclogs.com domain, so you shouldn't use com.dynamiclogs as a package name. There's no standard, but please change to grails.plugin.dynamiclogs since this is what most plugin developers use.

You should also rename the plugin to indicate that it uses and requires RabbitMQ - the current name is too generic.

In LogLevelController.changeLogLevel() you throw an exception if the command object has errors. java.lang.Exception doesn't have a constructor that takes an int and a String, so that will fail. Regardless, you should never throw Exception or RuntimeException - create a simple subclass with a self-descriptive name and optionally properties to hold custom data and throw that. If I want to try/catch your exception and ignore others, I'd need to catch _every_ exception and parse the exception message to determine which is yours. But I wouldn't use any exception at all in this case - just do the same thing that's done in the generated CRUD pages - re-render the GSP with the command object and display its errors.