Can't get line number or compiler error on exception?

E

Eric Gibson

Hey,

I want to be able to get a sensible exception message that I can actually use to
fix my code using asp.net... I was able to set up the Application_Error event, and
email exceptions to myself, but they only include "Message" and "StackTrace"...
Every email I've gotten includes no information about the error in a way that would
help me fix it.

I've tried using "GetBaseException", and "InnerException"... But all I get are
emails like this:

Error Caught in Application_Error event
Error in: http://domain.com/error2.aspx
Error Message: External component has thrown an exception.
Stack Trace: at
System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults results,
CodeDomProvider codeProvider, CodeCompileUnit sourceData, String sourceFile, String
sourceString)
at System.Web.Compilation.BaseCompiler.GetCompiledType()
at System.Web.UI.PageParser.CompileIntoType()
at System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation()

No line numbers, no descriptions of the errors, nothing. Is there something in this
message that I can parse out, to find the actual error message? Where do the
compiler error messages that I get when I'm working on the code come from, and how
can I access them? I've tried using the "ASPError" object in IIS, but it returns all
empty values when I transfer from an asp.net page.

Sigh...

Eric
 
E

Eric Gibson

Eric said:
Hey,

I want to be able to get a sensible exception message that I can
actually use to fix my code using asp.net...

I spoke too soon... It just hit me why asp.net can't produce line number/compiler
messages like ASP. Because it's not interpreted like ASP, it's compiled... So
obviously I can't get compiler messages, if it's already compiled into executable
code...

I'll just have to dump all the contents of the collections/variables and try to
reproduce the error...

Eric
 

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,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top