开发者

Best practices about throwing exceptions from a remote service exposed via Spring's HTTP Invoker?

开发者 https://www.devze.com 2023-03-17 13:21 出处:网络
Besides RemoteException and all of his subclases thro开发者_如何学编程wn for non business logic problems, what is the right way to handle business related exceptions?

Besides RemoteException and all of his subclases thro开发者_如何学编程wn for non business logic problems, what is the right way to handle business related exceptions? Is it OK to subclass RuntimeException in those cases? Should I keep my business exceptions being non-checked?


I believe business logic exceptions are actually the only justified case for the checked exceptions, unlike lower level connectivity, database, file access, etc. exceptions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号