Click here to Skip to main content
15,892,005 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionparsing user input to Create Filter SQL Pin
MartyK20071-Aug-07 1:55
MartyK20071-Aug-07 1:55 
AnswerRe: parsing user input to Create Filter SQL Pin
Craster1-Aug-07 2:44
Craster1-Aug-07 2:44 
GeneralRe: parsing user input to Create Filter SQL Pin
MartyK20071-Aug-07 3:02
MartyK20071-Aug-07 3:02 
Questionconvert an array to a string Pin
sixecho1-Aug-07 1:43
sixecho1-Aug-07 1:43 
AnswerRe: convert an array to a string Pin
_mubashir1-Aug-07 1:49
_mubashir1-Aug-07 1:49 
AnswerRe: convert an array to a string Pin
Tom Deketelaere1-Aug-07 1:54
professionalTom Deketelaere1-Aug-07 1:54 
AnswerRe: convert an array to a string Pin
Luc Pattyn1-Aug-07 2:54
sitebuilderLuc Pattyn1-Aug-07 2:54 
QuestionName of offending code Pin
Johan Hakkesteegt31-Jul-07 23:34
Johan Hakkesteegt31-Jul-07 23:34 
Hi,

In an attempt to simplify the debugging process, I wrote a public sub EC (ErrorCatcher), that I can call from anywhere in my app, which writes all necessary information to a text file. Something like:
Public Sub EC(Byval err As Exception)<br />
dim line as string = Now & " - Error: " & Err.TargetSite.Name & " - " & Err.Message<br />
'write line to file, etc.<br />
End Sub<br />
<br />
Private Sub MyCode()<br />
Try<br />
'some error happens here<br />
Catch ex As Exception<br />
EC(ex)<br />
End Try<br />
End Sub


This Err.TargetSite.Name is just my latest attempt, but it does not tell me that the error took place in Private Sub MyCode.

Is there any way (other than passing it to the EC sub as a handwritten string) at all to find out in what part of the code the exception occurred, at runtime, and if yes then how?

Any help or suggestions appreciated.

Johan

My advice is free, and you may get what you paid for.

AnswerRe: Name of offending code Pin
Christian Graus31-Jul-07 23:54
protectorChristian Graus31-Jul-07 23:54 
GeneralRe: Name of offending code Pin
Johan Hakkesteegt1-Aug-07 20:02
Johan Hakkesteegt1-Aug-07 20:02 
AnswerRe: Name of offending code Pin
Steven J Jowett31-Jul-07 23:58
Steven J Jowett31-Jul-07 23:58 
GeneralRe: Name of offending code Pin
Johan Hakkesteegt1-Aug-07 20:00
Johan Hakkesteegt1-Aug-07 20:00 
AnswerRe: Name of offending code Pin
Luc Pattyn1-Aug-07 0:27
sitebuilderLuc Pattyn1-Aug-07 0:27 
GeneralRe: Name of offending code Pin
Johan Hakkesteegt1-Aug-07 19:59
Johan Hakkesteegt1-Aug-07 19:59 
QuestionError when display report in crystal report viewer Pin
Mekong River31-Jul-07 22:56
Mekong River31-Jul-07 22:56 
QuestionC# code to vb.net Pin
Ahmad Zaidi31-Jul-07 22:00
Ahmad Zaidi31-Jul-07 22:00 
AnswerRe: C# code to vb.net Pin
Christian Graus31-Jul-07 22:02
protectorChristian Graus31-Jul-07 22:02 
AnswerRe: C# code to vb.net Pin
eyes200731-Jul-07 22:10
eyes200731-Jul-07 22:10 
GeneralRe: C# code to vb.net Pin
Ahmad Zaidi31-Jul-07 22:18
Ahmad Zaidi31-Jul-07 22:18 
Questionmove the toolbar in program Pin
eyes200731-Jul-07 20:58
eyes200731-Jul-07 20:58 
AnswerRe: move the toolbar in program Pin
Tom Deketelaere31-Jul-07 21:20
professionalTom Deketelaere31-Jul-07 21:20 
GeneralRe: move the toolbar in program Pin
eyes200731-Jul-07 22:26
eyes200731-Jul-07 22:26 
GeneralRe: move the toolbar in program Pin
Tom Deketelaere1-Aug-07 0:12
professionalTom Deketelaere1-Aug-07 0:12 
GeneralRe: move the toolbar in program Pin
eyes20071-Aug-07 1:00
eyes20071-Aug-07 1:00 
GeneralRe: move the toolbar in program Pin
Tom Deketelaere1-Aug-07 1:11
professionalTom Deketelaere1-Aug-07 1:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.