Jax-RS(泽西岛)上下文中 WebApplicationException 和 WebServiceException 的区别
我正在创建一个 Jersey Web 服务,并且我发现自己使用了上述两种异常类型。 WebServiceException 的构造函数允许您传递一个 String 作为原因,而 WebApplicationException 允许传入 HTTP 状态代码。包括构造函数的差异,拥有这两种异常类型的目的是什么?
谢谢。
I'm creating a Jersey web service, and I've found myself using both of the mentioned exception types. WebServiceException's constructor allows you to pass a String as the cause where WebApplicationException allows a HTTP status code to be passed in. Including constructor differences, what's the purpose of having these two exception types?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
