No exception of type DataAccessException can be thrown; an exception type must be a subclass of Throwable

前端 未结 5 874
旧巷少年郎
旧巷少年郎 2021-01-17 13:42

My source code like below. It has a error, \"No exception of type DataAccessException can be thrown; an exception type must be a subclass of Throwable\".

I can\'t un

5条回答
  •  一整个雨季
    2021-01-17 14:08

    Your DataAccessException is not a subclass of Throwable class (extends Throwable). It should be, and without this inheritance, your code is not compilable with the current throws clause.

    Here is an example: http://www.osix.net/modules/article/?id=754

提交回复
热议问题