在写dll的时候,出现这样的问题:代码类似这样:
Sub a1()
On Error Goto errorhandler Dim a As String If pathstring = "" Then
pathstring = App.Path & "\connectionstring.inc"
End If
..................
errorhandler:
..........
End Sub然后它不停的向事件查看器中写类似这样的信息:
The VB Application identified by the event source logged this Application
testpms(工程名) Thread ID: 2195,logged:(errorhandler的内容)其中小括号内的内容是我加的。问一下,这是为什么呢?我的app用的哪里不对呢?
多谢了!!
Sub a1()
On Error Goto errorhandler Dim a As String If pathstring = "" Then
pathstring = App.Path & "\connectionstring.inc"
End If
..................
errorhandler:
..........
End Sub然后它不停的向事件查看器中写类似这样的信息:
The VB Application identified by the event source logged this Application
testpms(工程名) Thread ID: 2195,logged:(errorhandler的内容)其中小括号内的内容是我加的。问一下,这是为什么呢?我的app用的哪里不对呢?
多谢了!!
APP.Path内容是什么?
之前要加上exit sub
这样才只有在错误捕获的情况下才跳转到记录错误日志..