如果失败,会抛出一个异常并予以处理。
如果抛出一个异常,连接和流就会被关闭。
If an exception is thrown, the connection and stream are closed.
使用此函数时将抛出一个异常并显示给用户。
When using this function an exception will be thrown and displayed to the user.
The exception is right there. It's an index error, that is it's trying to do something going beyond the range of what this thing could deal with.
但他事实上抛出一个异常,异常就在这里,这是一个下标错误,它是试图去取超出范围的元素造成的。
But if I say turn this into a float, ah it throws a value error exception.
它就会抛出一个值错误异常了,它会告诉我输入了一种错误的值。
So it's not defined. But in fact, what this did was it threw an exception.
这是未定义,但实际上,这里做的就是抛出一个异常。
应用推荐