Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
dfe6ef5b
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dfe6ef5b
编写于
8月 09, 2016
作者:
J
Jonathon Marolf
提交者:
Jonathon Marolf
8月 09, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
responding to PR feedback
上级
d2793f4d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
64 addition
and
19 deletion
+64
-19
src/VisualStudio/Core/Def/Implementation/Workspace/DetailedErrorInfoDialog.xaml
...Def/Implementation/Workspace/DetailedErrorInfoDialog.xaml
+20
-6
src/VisualStudio/Core/Def/Implementation/Workspace/DetailedErrorInfoDialog.xaml.cs
.../Implementation/Workspace/DetailedErrorInfoDialog.xaml.cs
+12
-7
src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioErrorReportingService.cs
...ementation/Workspace/VisualStudioErrorReportingService.cs
+30
-1
src/VisualStudio/Core/Def/PublicAPI.Unshipped.txt
src/VisualStudio/Core/Def/PublicAPI.Unshipped.txt
+0
-2
src/VisualStudio/Core/Def/ServicesVSResources.resx
src/VisualStudio/Core/Def/ServicesVSResources.resx
+2
-2
src/VisualStudio/Core/Def/ServicesVisualStudio.csproj
src/VisualStudio/Core/Def/ServicesVisualStudio.csproj
+0
-1
未找到文件。
src/VisualStudio/Core/Def/Implementation/Workspace/DetailedErrorInfoDialog.xaml
浏览文件 @
dfe6ef5b
...
...
@@ -8,6 +8,7 @@
xmlns:vs="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
mc:Ignorable="d"
x:ClassModifier="internal"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource {x:Static vs:VsBrushes.ToolboxBackgroundKey}}"
...
...
@@ -22,14 +23,27 @@
<RowDefinition Height="*"/>
<RowDefinition Height="38"/>
</Grid.RowDefinitions>
<ScrollViewer Grid.Column="0" Grid.Row="0" HorizontalScrollBarVisibility="Auto" Style="{DynamicResource {x:Static vs:VsResourceKeys.ScrollViewerStyleKey}}">
<TextBox Name="stackTraceText" IsReadOnly="True"
Background="{DynamicResource {x:Static vs:VsBrushes.ToolboxBackgroundKey}}"
Foreground="{DynamicResource {x:Static vs:VsBrushes.ButtonTextKey}}"/>
<ScrollViewer Grid.Column="0" Grid.Row="0"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
Style="{DynamicResource {x:Static vs:VsResourceKeys.ScrollViewerStyleKey}}">
<TextBox
Name="stackTraceText"
IsReadOnly="True"
Style="{DynamicResource {x:Static vs:VsResourceKeys.TextBoxStyleKey}}"/>
</ScrollViewer>
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Name="CopyButton" Height="24" Margin="0,0,10,0" Click="CopyMessageToClipBoard" Style="{DynamicResource {x:Static vs:VsResourceKeys.ButtonStyleKey}}"/>
<Button Name="CloseButton" Height="24" Width="70" Margin="0,0,10,0" Click="CloseWindow" Style="{DynamicResource {x:Static vs:VsResourceKeys.ButtonStyleKey}}"/>
<Button Name="CopyButton"
Height="24"
Margin="0,0,10,0"
Click="CopyMessageToClipBoard"
Style="{DynamicResource {x:Static vs:VsResourceKeys.ButtonStyleKey}}"/>
<Button Name="CloseButton"
Height="24" Width="70"
Margin="0,0,10,0"
Click="CloseWindow"
Style="{DynamicResource {x:Static vs:VsResourceKeys.ButtonStyleKey}}"/>
</StackPanel>
</Grid>
</ui:DialogWindow>
\ No newline at end of file
src/VisualStudio/Core/Def/Implementation/Workspace/DetailedErrorInfoDialog.xaml.cs
浏览文件 @
dfe6ef5b
...
...
@@ -18,14 +18,11 @@
namespace
Microsoft.VisualStudio.LanguageServices.Implementation
{
/// <summary>
/// Interaction logic for UserControl1.xaml
/// </summary>
public
partial
class
DetailedErrorInfoDialog
:
DialogWindow
internal
partial
class
DetailedErrorInfoDialog
:
DialogWindow
{
string
errorInfo
;
private
readonly
string
errorInfo
;
internal
DetailedErrorInfoDialog
(
string
title
,
string
errorInfo
)
internal
DetailedErrorInfoDialog
(
string
title
,
string
errorInfo
)
{
InitializeComponent
();
this
.
errorInfo
=
errorInfo
;
...
...
@@ -33,11 +30,19 @@ internal DetailedErrorInfoDialog(string title, string errorInfo)
stackTraceText
.
AppendText
(
errorInfo
);
this
.
CopyButton
.
Content
=
ServicesVSResources
.
Copy_to_clipboard
;
this
.
CloseButton
.
Content
=
ServicesVSResources
.
Close
;
}
private
void
CopyMessageToClipBoard
(
object
sender
,
RoutedEventArgs
e
)
{
System
.
Windows
.
Clipboard
.
SetText
(
errorInfo
);
try
{
System
.
Windows
.
Clipboard
.
SetText
(
errorInfo
);
}
catch
(
Exception
)
{
// rdpclip.exe not running in a TS session, ignore
}
}
private
void
CloseWindow
(
object
sender
,
RoutedEventArgs
e
)
...
...
src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioErrorReportingService.cs
浏览文件 @
dfe6ef5b
...
...
@@ -155,16 +155,45 @@ private static bool TryCreateInfoBarUI(IVsInfoBarUIFactory infoBarUIFactory, IVs
}
public
void
ShowDetailedErrorInfo
(
Exception
exception
)
{
string
errorInfo
=
GetErrorInfoForException
(
exception
);
(
new
DetailedErrorInfoDialog
(
exception
.
Message
,
errorInfo
)).
ShowModal
();
}
private
static
string
GetErrorInfoForException
(
Exception
exception
)
{
string
errorInfo
=
exception
.
Message
+
Environment
.
NewLine
+
exception
.
StackTrace
;
var
aggregateException
=
exception
as
AggregateException
;
if
(
aggregateException
?.
InnerExceptions
!=
null
)
{
foreach
(
var
ex
in
aggregateException
.
InnerExceptions
)
{
errorInfo
=
AppendExceptionInfo
(
errorInfo
,
ex
);
}
}
else
{
if
(
exception
.
InnerException
!=
null
)
{
errorInfo
=
AppendExceptionInfo
(
errorInfo
,
exception
.
InnerException
);
}
}
return
errorInfo
;
}
private
static
string
AppendExceptionInfo
(
string
errorInfo
,
Exception
exception
)
{
errorInfo
+=
Environment
.
NewLine
+
exception
.
Message
+
Environment
.
NewLine
+
exception
.
StackTrace
;
while
(
exception
.
InnerException
!=
null
)
{
exception
=
exception
.
InnerException
;
errorInfo
+=
Environment
.
NewLine
+
exception
.
Message
+
Environment
.
NewLine
+
exception
.
StackTrace
;
}
(
new
DetailedErrorInfoDialog
(
exception
.
Message
,
errorInfo
)).
ShowModal
()
;
return
errorInfo
;
}
}
}
src/VisualStudio/Core/Def/PublicAPI.Unshipped.txt
已删除
100644 → 0
浏览文件 @
d2793f4d
Microsoft.VisualStudio.LanguageServices.Implementation.DetailedErrorInfoDialog
Microsoft.VisualStudio.LanguageServices.Implementation.DetailedErrorInfoDialog.InitializeComponent() -> void
\ No newline at end of file
src/VisualStudio/Core/Def/ServicesVSResources.resx
浏览文件 @
dfe6ef5b
...
...
@@ -700,9 +700,9 @@ Additional information: {1}</value>
<value>
Prefer predefined type
</value>
</data>
<data
name=
"Copy_to_clipboard"
xml:space=
"preserve"
>
<value>
Copy to Cl
o
pboard
</value>
<value>
Copy to Cl
i
pboard
</value>
</data>
<data
name=
"Close"
xml:space=
"preserve"
>
<value>
Close
</value>
</data>
</root>
\ No newline at end of file
</root>
src/VisualStudio/Core/Def/ServicesVisualStudio.csproj
浏览文件 @
dfe6ef5b
...
...
@@ -742,7 +742,6 @@
<Compile
Include=
"SymbolSearch\SymbolSearchService.PatchService.cs"
/>
<None
Include=
"project.json"
/>
<PublicAPI
Include=
"PublicAPI.Shipped.txt"
/>
<PublicAPI
Include=
"PublicAPI.Unshipped.txt"
/>
</ItemGroup>
<ItemGroup>
<VSCTCompile
Include=
"Commands.vsct"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录