为了解决这一问题,可以在抛出异常语句期间,在异常对象的构造函数中生成一个堆栈跟踪。
To deal with this, you can generate a stack trace in the constructor of the exception object during the throw exception statement.
注意,伪变量声明已经没有了:不再需要它是因为现在在异常处理函数中有了实际的语句。
Note that the dummy variable declaration has disappeared: you don't need it because you now have an actual statement in the exception handler.
现在要处理sql语句有问题时的异常,然后显示成功注册的确认信息,并关闭POST响应(请参阅清单6)。
Now you're going to handle exceptions in case there are problems with your SQL statements, then display confirmation of successful registration and close the POST response (see Listing 6).
应用推荐