I'm using Symbols injected into my app's tapestry module to read web
context init parameters.

class MyModule {
   @Inject
   @Symbol("myapp.hairinesslevel")
   private int hairinessLevel;
}

I run the app in a bunch of different ways - in jetty:run, deployed as a
service, and in a web container, so occasionally I forget to define a
symbol.

Unfortunately, that tends to result in a very hard to read error about
recursion in the definition of 'ApplicationDefaults'.

Is there some canonical approach for injecting symbol that produces cleaner
error messages when the symbol is undefined?

Gratefully,

Michael

Reply via email to