Java - find the first cause of an exception

后端 未结 10 1023
渐次进展
渐次进展 2020-12-09 01:50

I need to check if an exception is caused by some database problem. I receive an Exception and check if its cause contains the \"ORA\" string and return that (something like

10条回答
  •  暖寄归人
    2020-12-09 02:16

    on 28-01-2015 , i have unable to solve my problem with any of the above solution, so my recommendation is to use :

    e.getMessage().toString();
    

    Ps: i am using it on android.

提交回复
热议问题