To see exceptions generated by using the improper mapping, create a database in the vender software of your choice, then set the current backend ID value as instructed above to the incorrect value.
为了看到使用不正确映射时抛出的异常,需要在您选择的厂商的软件上创建一个数据库,然后根据上面描述的把当前的后端 ID 设置为不正确的值。
See Resources for more detailed information about exceptions and exception handling techniques.
有关异常和异常处理技术的更多信息参阅参考资料。
You should get a clean run without exceptions, and will see the following in the console window after the application finishes its run: Getting the InitialContext...
您应当顺利地运行而不出现异常,当应用程序运行结束后,您将在控制台窗口中看到以下输出。
The question when we see exceptions, whether it's the Lykken and Tellegen study, not all twins were the same, the question is no longer whether or not change is possible, but rather how is change possible.
当我们看到了例外,无论是在Lykken和Tellegen的研究,当发现不是所有的双胞胎都一样,已不再是,改变是否有可能,而是怎样实现这种改变。
So, summarizing better, assert is something you put in to say to the user, make sure you're giving me input of this type, but I'm going to guarantee you the rest of the code works correctly. Exceptions and exception handlers are saying, here are the odd cases that I might see and here's what I'd like to do in those cases in order to try and be able to deal with them.
所以更好的总结下,断言就是你放在那里告诉用户,保证你输入的是这种类型的,但我能保证剩下的代码运行正确,异常和异常处理做的事,这里有些我能预期的异常情况,并且这里有些情况,我能尝试处理。
应用推荐