473,503 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.ThrowIfCompile rErrors(CompilerResults results,
CodeDomProvider codeProvider, CodeCompileUnit sourceData, String sourceFile, String
sourceString)
at System.Web.Compilation.BaseCompiler.GetCompiledTyp e()
at System.Web.UI.PageParser.CompileIntoType()
at System.Web.UI.TemplateParser.GetParserCacheItemThr oughCompilation()

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
Nov 18 '05 #1
1 4306
Eric Gibson wrote:
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
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
51970
by: Kim Haines | last post by:
I need help finding where an error is occuring in my code. I use a try-catch block like this in my global.asa: try { //my code } catch (e) { Application('errormsg') = ("An exception...
47
12023
by: Mountain Bikn' Guy | last post by:
Take some standard code such as shown below. It simply loops to add up a series of terms and it produces the correct result. // sum numbers with a loop public int DoSumLooping(int iterations) {...
18
4316
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
14
6995
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
26
3022
by: Bill Reid | last post by:
Bear with me, as I am not a "professional" programmer, but I was working on part of program that reads parts of four text files into a buffer which I re-allocate the size as I read each file. I...
8
2832
by: Herb | last post by:
In my design environment this works fine, but when I deploy it I get an error. I have a class "MessageBox" defined in my "App_Code" folder. My aspx file contains the line "Imports MessageBox" at...
0
2929
by: sauce | last post by:
Hi, Hm this error has gotten me really frustrated....I wrote a cgi script implementing threads using the threading module, but ran into these errors from my web server: Exception in thread...
5
4477
by: IdleBrain | last post by:
I am trying to log the Application name, Method name, line number and column number whenever an exception is generated in an C# 2005 application using the following code. Problem is that the...
2
3188
by: =?Utf-8?B?QXJ0aHVyIFBhcmtlcg==?= | last post by:
I've been having a problem occasionally with exceptions having the wrong line number listed. The situation is this: I have a function with a try-catch, and in the catch it logs the message and...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.