
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 0.98 KB | hits: 14 | expires: Never
FolderBrowserDialog crashes the application
try
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.RootFolder = Environment.SpecialFolder.Desktop;
if (fbd.ShowDialog() == DialogResult.OK)
{
// this.Minecraft.Text = fbd.SelectedPath;
}
}
catch
{
}
AppDomain.CurrentDomain.FirstChanceException += (sender, e) =>
{
if ((e == null) || (e.Exception == null))
{
return;
}
using (var sw = File.AppendText(@".exceptions.txt"))
{
sw.WriteLine(e.ExceptionObject);
}
};
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
if ((e == null) || (e.ExceptionObject == null))
{
return;
}
using (var sw = File.AppendText(@".exceptions.txt"))
{
sw.WriteLine(e.ExceptionObject);
}
};