Configuration Error Not Helpful

P

Peter D. Dunlap

I've got a custom configuration section in my web site and a custom
handler, which all works fine. However, other people are going to
start working with this site soon, and probably messing with the
configuration. I've found that if there is an error in my custom
configuration section, the message I get is "Exception in
configuration section handler" regardless of what kind of exception
I'm throwing from inside the handler code.

I can go in and debug the site and find what exception is actually
being thrown, but this is a pain to do, and once others start messing
with things they will be very confused by this.

Is there any way to get it to display a more meaningful error - like
for instance the one I am throwing?
 
G

Guest

Hi Peter,

What kind of error in the configuration section causes the exception to be
thrown?

Also, are you talking about 'schema' errors?

Do you also require custom configuration requirements wherein you want
specific attributes as is-required, while other attributes as optional?
 
P

Peter D. Dunlap

Hi Peter,

What kind of error in the configuration section causes the exception to be
thrown?

Also, are you talking about 'schema' errors?

Do you also require custom configuration requirements wherein you want
specific attributes as is-required, while other attributes as optional?

It doesn't matter what kind of error it is. A recently added xsd
schema validation, and any error that gets thrown from that gets this
generic message. Previously I was not using a schema and had my own
error checking and threw my own exceptions, and the messages from
those exceptions never got displayed.

In this particular case all attributes are required. I have another
portion of the site which uses xml files and those have some optional
attributes (I specify a default value for them in the schema).
Exceptions thrown by that validation show up in full on the browser
when they happen. Exceptions thrown by the configuration code result
in an unhelpful generic message that does not indicate what the
problem is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top