The compiler can perfectly well figure out which types of exception t could hold and prove that Listing 1 will not violate the contract of foo - without making the programmer jump through hoops.
编译器可以非常清楚地找出哪种类型的异常t可以保留并证实清单1不会违反foo的合同—而无需程序员赴汤蹈火。
But the exception parameter t is declared as a Throwable, and Throwable cannot be thrown from foo unless the throws clause is modified.
但是异常参数t被声明为Throwable,且如果没有修改throws子句,则Throwable不能从foo中抛出。
Because t: : PublicAccess has no control over its environment, it does not use an assertion, but instead throws an exception to preach to its callers about the errors of their ways.
因为T: PublicAccess无法控制其所处的环境,所以它并不使用断言,而是抛出一个异常给它的调用者,而这些调用者处理这个异常的方式也各有千秋。
The fact that a Latino woman is coming from the South Bronx shouldn't be an exception.
VOA: standard.2010.06.05
OK, so far though, I've just shown you what happens inside a peace a code. It raises an exception. It goes to that accept clause. We don't have to use it just inside of one place.
好了,我已经给你们看了,代码内部发生了什么,它报了一个异常,然后就到了处理的片段,我们不该就在一个地方用它。
That says it's in here. It's in this tri-block. It raised an exception, but it wasn't and I O error.
这在这里它是一个try程序块,它报出异常,但他不是io错误。
应用推荐