Hi,
I am seeking to obtain the line number of an error once
deployed with out inserting line numbers in the method.
The IDE inserts line numbers but this function does not
appear to be a deployment option. Without entering a line
number eg.(10210:) in the code erl and e.tostring do not
indicate the line on which the error occured. Inserting
line numbers appeares to insert no-ops into the code when
it is stepped through in the IDE. Is there something I
am missing on this or do I need to insert line numbers
for run time reporting like VB6
Thanks
Al 10 5253
Use the Debug.writeline method to give you runtime information. This will
print in the output window of the debugger.
Debug.Writeline ("I'm printout out a statement now")
OHM
Al wrote: Hi,
I am seeking to obtain the line number of an error once deployed with out inserting line numbers in the method. The IDE inserts line numbers but this function does not appear to be a deployment option. Without entering a line number eg.(10210:) in the code erl and e.tostring do not indicate the line on which the error occured. Inserting line numbers appeares to insert no-ops into the code when it is stepped through in the IDE. Is there something I am missing on this or do I need to insert line numbers for run time reporting like VB6
Thanks Al
Hi,
My concern is once the product is deployed thus the
IDE/Debugger is not in use. I do not want to insert
anything into the code manualy but would still like to
get line numbers :)
Al -----Original Message----- Use the Debug.writeline method to give you runtime
information. This willprint in the output window of the debugger.
Debug.Writelin e("I'm printout out a statement now")
OHM Al wrote: Hi,
I am seeking to obtain the line number of an error once deployed with out inserting line numbers in the method. The IDE inserts line numbers but this function does not appear to be a deployment option. Without entering a
line number eg.(10210:) in the code erl and e.tostring do
not indicate the line on which the error occured. Inserting line numbers appeares to insert no-ops into the code
when it is stepped through in the IDE. Is there something I am missing on this or do I need to insert line numbers for run time reporting like VB6
Thanks Al
.
* "Al" <an*******@disc ussions.microso ft.com> scripsit: I am seeking to obtain the line number of an error once deployed with out inserting line numbers in the method. The IDE inserts line numbers but this function does not appear to be a deployment option. Without entering a line number eg.(10210:) in the code erl and e.tostring do not indicate the line on which the error occured. Inserting line numbers appeares to insert no-ops into the code when it is stepped through in the IDE. Is there something I am missing on this or do I need to insert line numbers for run time reporting like VB6
See (complete thread):
<http://groups.google.c om/groups?selm=u7P OIgjfDHA.3616%4 0TK2MSFTNGP11.p hx.gbl>
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Hi Al,
Line numbers are only available in .NET 1.1 and also only when compiled
for debug. Would you be happy deploying a debug version?
Regards,
Fergus
Write the errors to a log file then
OHM an*******@discu ssions.microsof t.com wrote: Hi,
My concern is once the product is deployed thus the IDE/Debugger is not in use. I do not want to insert anything into the code manualy but would still like to get line numbers :)
Al
-----Original Message----- Use the Debug.writeline method to give you runtime information. This will print in the output window of the debugger.
Debug.Writeline ("I'm printout out a statement now")
OHM Al wrote: Hi,
I am seeking to obtain the line number of an error once deployed with out inserting line numbers in the method. The IDE inserts line numbers but this function does not appear to be a deployment option. Without entering a line number eg.(10210:) in the code erl and e.tostring do not indicate the line on which the error occured. Inserting line numbers appeares to insert no-ops into the code when it is stepped through in the IDE. Is there something I am missing on this or do I need to insert line numbers for run time reporting like VB6
Thanks Al
.
* <an*******@disc ussions.microso ft.com> scripsit: My concern is once the product is deployed thus the IDE/Debugger is not in use. I do not want to insert anything into the code manualy but would still like to get line numbers :)
Then you'll have to insert the line numbers before compiling. Maybe you
can write an add-in to automate that, but IMO that's not a goof idea
because it will reduce performance.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
* "Fergus Cooney" <fi****@post.co m> scripsit: Line numbers are only available in .NET 1.1
Where did you read that?!
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Yeah, true but I thought this was for debugging purposes ?
OHM.
One Handed Man wrote: Write the errors to a log file then
OHM
an*******@discu ssions.microsof t.com wrote: Hi,
My concern is once the product is deployed thus the IDE/Debugger is not in use. I do not want to insert anything into the code manualy but would still like to get line numbers :)
Al
-----Original Message----- Use the Debug.writeline method to give you runtime information. This will print in the output window of the debugger.
Debug.Writeline ("I'm printout out a statement now")
OHM Al wrote: Hi,
I am seeking to obtain the line number of an error once deployed with out inserting line numbers in the method. The IDE inserts line numbers but this function does not appear to be a deployment option. Without entering a line number eg.(10210:) in the code erl and e.tostring do not indicate the line on which the error occured. Inserting line numbers appeares to insert no-ops into the code when it is stepped through in the IDE. Is there something I am missing on this or do I need to insert line numbers for run time reporting like VB6
Thanks Al
.
* "One Handed Man" <Bo****@Duck.ne t> scripsit: Yeah, true but I thought this was for debugging purposes ?
I think it should be part of an error reporting system with the release
version of the application. Getting the line numbers with the
'StackTrace' won't work in an application that is compiled in Release
mode, so I wouldn't use it in a distribution. Maybe it's better to add
custom error handling code or line numbers by hand on critical places in
the sourcecode.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 occurred in the script. Error
name: " + e.name
|
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 C# equivalent. Any ideas?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
varnk@diebold.com
|
by: Paul |
last post by:
I am using a try-catch-finally statement.
In my Catch clause, I trap an error and display the error with the .Message
property of the Exception class.
The problem is that I do not know which line within the code that the error
occurred?
I do not see a property that tells me that.
|
by: Rotsey |
last post by:
Hi,
I am trying to write some error handling code to log the error.
But getting the line number of the error is not simple.
Is it because the app is set to "Release" and does not have debug info.
Is there a way of getting the line number when in release mode?????
Thanks
|
by: aljamala |
last post by:
Hi,
I have a page that whenever an error occur, I send an email to support
with the error description, script name, server, referer, etc...
However, I want to add the line number to the email message. So far, I
have found that you would have to modify the custom error (500;100) on
the IIS to point to your own error page to be able to use the
Server.GetLastError object.
| |
by: DontB3 |
last post by:
Hi, I'm new in this forum, and i hope someone can help.
I'm creating an automatic application that transfer a database from Access -> DBF -> Oracle.
When My App try to execute Insert SQL statement from DBF to Oracle database i found an error like this
{Run-time error "7": Error executing statement! Error: System resource exceeded.}
and then my program crash! i have to close my app, and start again.
could some one help me to...
|
by: Bryan Crouse |
last post by:
I am looking a way to do error checking on a string at compile time,
and if the string isn't the correct length have then have the compiler
throw an error.
I am working an embedded software that will require individual builds
for each device so that the device serial number is contained in the
program memory. To do this, the C application must be compiled with
the serial number assigned to a variable within the source code file.
I...
|
by: Ravi, Dallas, Texas |
last post by:
http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic22503.aspx
shows ways to get errors in a server context.
i am trying to find ways to trap the line number where the code is
failing in try catch set up. if i hard code the line number by
looking at the IDE's editor, it will be soon out of date when i start
modifying the code as needed.
i want to let the users know on which line the application failed. if...
|
by: Adam Tippelt |
last post by:
Hi,
This one has been bugging me for a while, and I can't find a solution to get round it.
The error message is:
Run-time error '3022':
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |