解决错误 Cannot await in the body of a catch clause
解决错误 Cannot await in the body of a catch clause
|
static async Task f() { ExceptionDispatchInfo capturedException = null; try { await TaskThatFails(); } catch (MyException ex) { capturedException = ExceptionDispatchInfo.Capture(ex); }
if (capturedException != null) { await ExceptionHandler();
capturedException.Throw(); } } |
解决错误 Cannot await in the body of a catch clause的更多相关文章
- SQL 2012 发布与订阅实现数据同步 图解(解决 错误22022)
概念参见:https://msdn.microsoft.com/zh-cn/library/ms151170.aspx 推送订阅 对于推送订阅,发布服务器将更改传播到订阅服务器,而无需订阅服务器发出请 ...
- Phonegap解决错误:Error initializing Cordova:Class not found
Phonegap 解决错误: Alert [ERROR]Error initializing Cordova:Class not found 发现bug后找原因 网上说是 因为找不到 ...
- Maximum execution time of 30 seconds exceeded解决错误方法
Maximum execution time of 30 seconds exceeded解决错误方法Fatal error: Maximum execution time of 30 seconds ...
- 在vs2010中编译log4cxx-0.10.0详细方法(从下载、编译、解决错误详细介绍)
在vs2010中编译log4cxx-0.10.0详细方法(从下载.编译.解决错误详细介绍) http://blog.sina.com.cn/s/blog_a459dcf501013tbn.html
- 【转】链接任意目录下库文件(解决错误“/usr/bin/ld: cannot find -lxxx”
netbeans构建项目也出现了同样的问题.猜测是netbeans内部就用的是-l 这种编译方式,所以需要把***.a手动改为lib***.a 原文地址:链接任意目录下库文件(解决错误“/usr/bi ...
- 如何解决 错误code signing is required for product type 'xxxxx' in SDK 'iOS 8.2'
如何解决 错误code signing is required for product type 'xxxxx' in SDK 'iOS 8.2' 大家在做真机调试的时候,或许会遇到这样的问题,那如何 ...
- python升级带来的yum异常(解决错误File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:)
解决错误File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 错误: 原因: 这是因为yum采用python作为命令解 ...
- 如何解决错误【selenium.common.exceptions.SessionNotCreatedException】
如何解决错误[selenium.common.exceptions.SessionNotCreatedException] [问题起因] 2018年12月26日晚,启动我的pycharm准备学习s ...
- 解决错误 CS1617 Invalid option '7.1' for /langversion; must be ISO-1, ISO-2, Default or an integer in range 1 to 6.
解决错误 CS1617 Invalid option '7.1' for /langversion; must be ISO-1, ISO-2, Default or an integer in ra ...
随机推荐
- 服务 在初始化安装时发生异常:System.IO.FileNotFoundException: "file:///D:\testService"未能加载文件或程序集。系统找不到指定文件。
@echo.@if exist "%windir%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe" goto INSTALL ...
- 【SFTP】使用Jsch实现Sftp文件上传-支持断点续传和进程监控
JSch是Java Secure Channel的缩写.JSch是一个SSH2的纯Java实现.它允许你连接到一个SSH服务器,并且可以使用端口转发,X11转发,文件传输等,当然你也可以集成它的功能到 ...
- MSSQL 批量Update
UPDATE dbo.WX_TWODIMENCODE_INFO SET wti_scan_views=t.count FROM ( SELECT COUNT(*) AS 'count',lci_ere ...
- ARM-ContexM3/4组优先级和子优先级抢占规则
多个中断源在它们的抢占式优先级相同的情况下,子优先级不论是否相同,如果某个中断已经在服务当中,则其它中断源都不能打断它:只有抢占式优先级高的中断才可以打断其它抢占式优先级低的中断. 就是说, 组优先级 ...
- Serif和Sans-serif字体的区别
在西方国家罗马字母阵营中,字体分为两大种类:Sans Serif和Serif,打字机体虽然也属于Sans Serif,但由于是等宽字体,所以另外独立出Monospace这一种类,例如在Web中,表示代 ...
- SharePrecences--(json+sharePrecences)存list 或对象
利用Gson和SharePreference存储结构化数据 具体的步骤 这个假设有三个User对象生成一个ArrayList<User>: User user1 = new User(&q ...
- java 遍历map 方法 集合 五种的方法
package com.jackey.topic; import java.util.ArrayList;import java.util.HashMap;import java.util.Itera ...
- 常用PHP函数类目录
说明:用来记录我在开发过程中,经常用到的一些常用函数或者常用类. 常用函数 PHP常用函数 (1) 常用类 PHP表单数据校验类
- Grunt的使用
在Node环境下.需要预先安装好Node. 1.安装grunt-cli [root@Luxh-01 ~]# npm install -g grunt-cli 2.创建一个目录test [root@Lu ...
- Combobox
1.方式一 <select id="cc" class="easyui-combobox" name="dept" style=&qu ...