pri*_*ing 18 postgresql clojure
在postgresql中使用clojure时,每当我发出的语句以某种方式出现格式错误或被db本身拒绝时,我都会遇到以下错误:
java.sql.BatchUpdateException:
Batch entry 0 drop schema public cascade was aborted.
Call getNextException to see the cause.
Run Code Online (Sandbox Code Playgroud)
如何调用getNextException以便我可以看到我做错了什么?我在哪里打电话给它?
请参阅clojure/jdbc上的此链接,其中显示了如何使用Clojure/JDBC删除表.
它还向您展示了如何使用try catch块处理错误.
从try try块中,您可以编写类似于:
(.printStackTrace (.getCause e))
Run Code Online (Sandbox Code Playgroud)