When an SQLException occurs, you should see something similar to Figure 25.
当发生一个SQLException异常时,您应该会看到类似于图25所示的内容。
In the next section, you will code your own exception handler to handle the SQLException.
在下一节中,您将对异常处理程序进行编码,以便处理SQLException异常。
As mentioned in the previous section, you can code your own exception handler to handle the SQLException.
正如上一节中提到的一样,您可以编写自己的异常处理程序来处理SQLException异常。
If the database cannot be created, a SQLException is thrown indicating that the database cannot be found.
如果无法创建数据库,就会抛出SQLException,表示无法找到该数据库。
If the database cannot be created, a SQLException is thrown, indicating that the database cannot be found.
如果无法创建数据库,就会抛出SQLException,表示无法找到该数据库。
If you do not close the XMLStreamWriter object prior to invoking the updater methods, SQLException gets thrown.
如果没有在调用updater方法之前关闭XMLStreamWriter对象,则会抛出SQLException。
When Derby shuts down a database, it throws an SQLException with an SQLState of 08006, which is why the catch block ignores this exception.
Derby关闭数据库时,将抛出SQLException,使用08006作为SQLState,这就是catch块忽略此异常的原因。
The SQLWarning class inherits from the SQLException class; however, a SQL warning is less severe than an SQL exception, so it's better to handle them separately.
sqlwarning类继承自sqlexception类;但是SQL警告不如SQL异常那么严重,所以更好的方法是分别处理它们。
The SQLWarning class inherits from the SQLException class; however, a SQL warning is less severe than an SQL exception, so it's better to handle them separately.
sqlwarning类继承自sqlexception类;但是SQL警告不如SQL异常那么严重,所以更好的方法是分别处理它们。
应用推荐