database - C#: Exception handling with “using/try/catch” in WCF service

标签 database wcf error-handling

我刚刚发布了有关“使用/尝试/捕获”构造的一般用法的问题,现在一切都清楚了。

但是,我有一个与上一个问题相关的新问题-如果在WCF服务的方法中使用“使用/尝试/捕获”构造,该如何使用?目的是在客户端上查看特定数据库异常的描述。

先感谢您。

最佳答案

fault = Message.CreateMessage(version, sqlServerFault, newEx.Action);

看看这篇博客文章WCF error handling and some best practices

关于database - C#: Exception handling with “using/try/catch” in WCF service,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13082982/

相关文章:

具有 EMP_ID 和大量时间戳的 mySQL 表

database - 如何在Flutter中不同时间在Sqlite数据库中创建多个表

wcf - 支持 WSE 3.0 吗?

wcf - 无法使对 WCF Web 服务的并发调用正常工作

android - java.lang.IllegalArgumentException : invalid type for value: class android. 图形.Bitmap

python - 打印字符串命令抛出python ZeroDivisionError

python - Python 对象数据库列表

c# - WCF 服务大 Linq 响应

curl - cURL try catch问题

php - PHP 中 MySQL、MSSQL 和 Oracle 的标准连接库