哪些错误不可捕获? [英] What errors are not trappable?

查看:71
本文介绍了哪些错误不可捕获?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用下面的代码,但是错误并没有被困。

这样的错误会发生在哪里?

在另一个过程中?


尝试

SomeCode

Catch ex As Exception

Dim strMsg()As String = Split(ex.ToString ,vbCrLf)

使用lstStuff

对于i = 0到UBound(strMsg)

.Items.Add(strMsg(i))

下一页我

结束

结束尝试


-
http://www.standards.com/; 请参阅Howard Kaikow的网站。

I''m using the code below, but an error is not getting trapped.
Where can such errors occur?
In another process?

Try
SomeCode
Catch ex As Exception
Dim strMsg() As String = Split(ex.ToString, vbCrLf)
With lstStuff
For i = 0 To UBound(strMsg)
.Items.Add(strMsg(i))
Next i
End With
End Try

--
http://www.standards.com/; See Howard Kaikow''s web site.

推荐答案

Howard Kaikow < KA **** @ standards.com> schrieb:
"Howard Kaikow" <ka****@standards.com> schrieb:
我正在使用下面的代码,但错误没有被困。
这样的错误会发生在哪里?
I''m using the code below, but an error is not getting trapped.
Where can such errors occur?




错误信息是什么?


-

MS Herfried K. Wagner

MVP< URL :http://dotnet.mvps.org/>

VB< URL:http://classicvb.org/petition/>



What''s the error message?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>




只有在某些代码中发生错误时,才会执行catch

语句下的代码块,这是你的意图吗?


问候


Michel Posseth [MCP]


" Howard Kaikow"写道:

Only when an error occurs in somecode the code block under the catch
statement will be executed , is this your intention ?

regards

Michel Posseth [MCP]

"Howard Kaikow" wrote:
我正在使用下面的代码,但错误没有被困。
这样的错误会在哪里发生?
在另一个过程中?

尝试
SomeCode
Catch ex Exception
Dim strMsg()As String = Split(ex.ToString,vbCrLf)
使用lstStuff
对于i = 0到UBound(strMsg)
.Items.Add(strMsg(i))
接下来我
结束用
结束尝试

- -
http://www.standards.com/; 请参阅Howard Kaikow的网站。
I''m using the code below, but an error is not getting trapped.
Where can such errors occur?
In another process?

Try
SomeCode
Catch ex As Exception
Dim strMsg() As String = Split(ex.ToString, vbCrLf)
With lstStuff
For i = 0 To UBound(strMsg)
.Items.Add(strMsg(i))
Next i
End With
End Try

--
http://www.standards.com/; See Howard Kaikow''s web site.



" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道

news:uA ************** @ TK2MSFTNGP04.phx.gbl ...
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uA**************@TK2MSFTNGP04.phx.gbl...
" Howard Kaikow" < KA **** @ standards.com> schrieb:
"Howard Kaikow" <ka****@standards.com> schrieb:
我正在使用下面的代码,但是错误没有被困。
这样的错误会发生在哪里?
I''m using the code below, but an error is not getting trapped.
Where can such errors occur?



什么'是错误信息?



What''s the error message?




这是没有消息,


我试图捕获错误我在2006年6月24日的帖子中发布的代码

Ghost 10和VB 6以及VB .NE。


我修改了代码并添加了跟随btnRunMe点击evet

代码。


试试

FindMyFiles(strFilename,i)

Catch ex As Exception

Dim strMsg()As String = Split(ex.ToString,vbCrLf)

使用lstStuff

对于i = 0到UBound(strMsg)

.Items.Add(strMsg(i))

下一个我

结束

结束尝试



THere is no message,

I''m trying to trap the error in the code I posted in my 24 June 2006 thread
Ghost 10 and VB 6 and VB .NE.

I''ve modified the code and added the following to the btnRunMe click evet
code.

Try
FindMyFiles(strFilename, i)
Catch ex As Exception
Dim strMsg() As String = Split(ex.ToString, vbCrLf)
With lstStuff
For i = 0 To UBound(strMsg)
.Items.Add(strMsg(i))
Next i
End With
End Try


这篇关于哪些错误不可捕获?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆