try-catch名称 [英] try-catch name

查看:101
本文介绍了try-catch名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我无法相信自己的眼睛,但到目前为止我还无法找到构造的名称

是什么从一个try块和catch子句

(处理程序)。我不是在寻找一个语法名称,但人们可以记住,就像处理程序一样。但是不是处理程序,因为那些是捕获

子句而且尝试不属于那里。我查看了所有书籍

和标准,但我找不到名字。 : - (


有没有人知道这个名字?如果有,请与我分享

这里。:-)
< br $>
-

WW aka Attila

:::

RTFM:不只是一个缩写,它是'法律!

Hi,

I cannot believe my eyes, but so far I could not find out what is the name
of the construct, which is built from one try block and the catch clauses
(handlers). I am not looking for a grammar name, but something people can
remember, like handler. But is not handler, because those are the catch
clauses and the try does not belong there. I have looked at all my books
and the standard, but I could not find a name. :-(

Is there anyone who knows that name? If there is, please share it with me
here. :-)

--
WW aka Attila
:::
RTFM: Not just an acronym, it''s the LAW!

推荐答案

白狼写道:


我简直不敢相信我眼睛,但到目前为止,我无法找出构造的名称
,它是由一个try块和catch子句(处理程序)构建的。我不是在寻找语法名称,而是人们可以记住的东西,比如处理程序。但是不是处理程序,因为那些是捕获
子句而且try不属于那里。我查看了所有书籍和标准,但我找不到名字。 :-(

有没有人知道这个名字?如果有,请与我分享
这里。: - )
Hi,

I cannot believe my eyes, but so far I could not find out what is the name
of the construct, which is built from one try block and the catch clauses
(handlers). I am not looking for a grammar name, but something people can
remember, like handler. But is not handler, because those are the catch
clauses and the try does not belong there. I have looked at all my books
and the standard, but I could not find a name. :-(

Is there anyone who knows that name? If there is, please share it with me
here. :-)




它被称为try语句。


Gregg



It''s called a try statement.

Gregg


GB写道:
白狼写道:


我无法相信自己的眼睛,但到目前为止我无法找出构造的名称是什么,是从一个try块和catch
子句(处理程序)构建的。我不是在寻找语法名称,而是人们可以记住的东西,比如处理程序。但不是处理程序,因为那些
是catch子句,而try不属于那里。我看过所有的书和标准,但我找不到名字。 :-(

有没有人知道这个名字?如果有的话,请在这里与我分享。: - )
Hi,

I cannot believe my eyes, but so far I could not find out what is the
name of the construct, which is built from one try block and the catch
clauses (handlers). I am not looking for a grammar name, but something
people can remember, like handler. But is not handler, because those
are the catch clauses and the try does not belong there. I have looked
at all my books and the standard, but I could not find a name. :-(

Is there anyone who knows that name? If there is, please share it with
me here. :-)



它这叫做试一试。



It''s called a try statement.




谢谢。你能告诉我在哪里可以找到它吗?我试图找到

" try statement"在标准中,在C ++编程语言规范中。

版甚至谷歌。


据我所知,C ++不使用try语句文献(它是在C#和Python中使用的
),或者在使用它时,它被用作try关键字或try表达式的synonim

,没有其中包含整个

try-and-all-catch的东西。这就是为什么我要求获得

信息的来源,我似乎无法找到它。


-

WW aka阿提拉

:::

给一个人一条鱼,他会吃一天。教一个男人去钓鱼他就会整天坐在船上喝啤酒。



Thanks. Could you tell me where can this be found? I have tried to find
"try statement" in the standard, in The C++ Programming Language Spec.
Edition and even Google.

As far as I can see the try statement is not used by C++ literature (it is
used in C# and Python), or where it is used it is used either as the synonim
for the try keyword or the try expression, none of which contains the whole
try-and-all-catch thing. That is why I have asked for source of
information, I cannot seem to find it.

--
WW aka Attila
:::
Give a man a fish and he will eat for a day. Teach a man to fish and he
will sit in a boat all day drinking beer.


White Wolf写道:
White Wolf wrote:
GB写道:
GB wrote:
白狼写道:
White Wolf wrote:


我不敢相信自己的眼睛,到目前为止,我无法找出构造的名称是什么,它是从一个try块和catch
子句(处理程序)构建的。我不是在寻找语法名称,而是人们可以记住的东西,比如处理程序。但不是处理程序,因为那些
是catch子句,而try不属于那里。我看过所有的书和标准,但我找不到名字。 :-(

有没有人知道这个名字?如果有的话,请在这里与我分享。: - )
Hi,

I cannot believe my eyes, but so far I could not find out what is the
name of the construct, which is built from one try block and the catch
clauses (handlers). I am not looking for a grammar name, but something
people can remember, like handler. But is not handler, because those
are the catch clauses and the try does not belong there. I have looked
at all my books and the standard, but I could not find a name. :-(

Is there anyone who knows that name? If there is, please share it with
me here. :-)



它's称为try语句。



It''s called a try statement.



谢谢。你能告诉我在哪里可以找到它吗?我试图找到
try statement在标准中,在C ++编程语言规范版本中,甚至谷歌。
据我所知,C语言文档没有使用try语句(它在C#和/ Python),或者在使用它的地方,它被用作try关键字或try表达式的synonim
,其中没有一个包含整个
try-and-all-catch的东西。这就是为什么我要求获取信息的来源,我似乎无法找到它。


Thanks. Could you tell me where can this be found? I have tried to find
"try statement" in the standard, in The C++ Programming Language Spec.
Edition and even Google.
As far as I can see the try statement is not used by C++ literature (it is
used in C# and Python), or where it is used it is used either as the synonim
for the try keyword or the try expression, none of which contains the whole
try-and-all-catch thing. That is why I have asked for source of
information, I cannot seem to find it.




我必须承认,我看了(尽管简短)而且也找不到确定的答案。这就是我如何引用它。语法

将try-block视为语句,将catch处理程序视为

语句,但是如果没有其他语句则将语义错误视为一个语义错误,所以

整个构造在我看来是一个声明。

肯定是整个结构可以用作一个。例如:


if(cond)

试试{

}

catch(.. 。){

}


我想也许标准调用整个构造异常

处理程序,它包含一个尝试条款和捕获条款。


Gregg



Well I have to admit, I looked (albeit briefly) and couldn''t find a
definite answer either. That''s just how I would refer to it. The grammar
treats the try-block as a statement and the catch handler as a
statement, but it is a semantic error to have one without the other, so
the whole construct would appear to me to be a statement. It is
certainly true that the whole construct can be used as one. For example:

if (cond)
try {
}
catch (...) {
}

I think maybe the standard calls the whole construct an exception
handler, which consists of a try clause and a catch clause.

Gregg


这篇关于try-catch名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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