In certain applications I have (vb.net 2003), when I
catch an exception and print the toString (or
stacktrace), it does NOT show the line number. However,
other simple apps I have it does show the line number.
How can I get it to always show the line number. How/why
is it not always showing it? Anyway, this is what the
exception shows (from one of the apps where exception
isn't working correctly):
System.DivideByZeroException: Attempted to divide by zero.
at eCCBOAUnifiedDesktopPrototype.frmMain.btnExTest_Cl ick
(Object sender, EventArgs e)
This is what it SHOULD be showing (from on of the simple
apps that it does work in):
System.DivideByZeroException: Attempted to divide by zero.
at TestExcep1.Form1.btnExTest_Click(Object sender,
EventArgs e) in c:\prog\vsnet\KillMeSoon\TestExcept1
\Form1.vb:line 62
Anyway, exception stacktraces are not nearly as useful
without the line number.
Thanks for any info anyway may have on this, as I have
not been able to fine ANY reference to this issue.
Tony 1 2699
In article <02****************************@phx.gbl>, Tony wrote: In certain applications I have (vb.net 2003), when I catch an exception and print the toString (or stacktrace), it does NOT show the line number. However, other simple apps I have it does show the line number. How can I get it to always show the line number. How/why is it not always showing it? Anyway, this is what the exception shows (from one of the apps where exception isn't working correctly):
System.DivideByZeroException: Attempted to divide by zero. at eCCBOAUnifiedDesktopPrototype.frmMain.btnExTest_Cl ick (Object sender, EventArgs e)
This is what it SHOULD be showing (from on of the simple apps that it does work in):
System.DivideByZeroException: Attempted to divide by zero. at TestExcep1.Form1.btnExTest_Click(Object sender, EventArgs e) in c:\prog\vsnet\KillMeSoon\TestExcept1 \Form1.vb:line 62
Anyway, exception stacktraces are not nearly as useful without the line number.
Thanks for any info anyway may have on this, as I have not been able to fine ANY reference to this issue.
Tony
It depends on the build type. If you build the app in debug mode, then
you will get line numbers. If you build it in release mode, then you
will not since that information is removed from the executable.
--
Tom Shelton
MVP [Visual Basic] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Hugh Macdonald |
last post by:
I'm writing a tool at the moment that reads in an external file (which
can use any Python syntax)
At the moment, I'm reading the file in using:
scriptLines = open(baseRippleScript).read()...
|
by: Psibur |
last post by:
Hello, trying to get back into c and was having issue with reading a
simple text file with an aribtrary # of lines with 3 int's per line,
with the eventual purpose of putting each int into an...
|
by: Ken Varn |
last post by:
I want to be able to determine my current line, file, and function in my C#
application. I know that C++ has the __LINE__, __FUNCTION__, and __FILE___
macros for getting this, but I cannot find a...
|
by: BoloBaby |
last post by:
OK, check this out...
I have a form with a panel control and button on it (outside the panel
control).
I have two event handlers - one handles the click event of the button on the
form. The...
|
by: Justin Emlay |
last post by:
I'm hopping someone can help me out on a payroll project I need to
implement.
To start we are dealing with payroll periods. So we are dealing with an
exact 10 days (Monday - Friday, 2 weeks).
...
| |
by: Daniel |
last post by:
hi guys
i have never understood this so i am hoping someone can help.
I have had errors in my app before where on closing it down i get a
NullReferenceException error thrown BUT no line number...
|
by: Rahul |
last post by:
Hi,
Is there a way to get the line numbers to display in the exception when you
have published your web site?
Thanks
Rahul
|
by: Digital Puer |
last post by:
Hi, I am interested in catching exceptions and printing the
line number and file name of where the exception occurred,
like what is done in Java. For example, when vector's at()
accesses beyond...
|
by: Christoph Zwerschke |
last post by:
I'm just reading PEP 3107 (function annotations) and wonder why
exceptions are not mentioned there. I think it would be helpful if one
could specify which exceptions can be raised by a function,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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,...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |