Catch IOExceptions when opening files

Branch_2.1.x
Nathan Crawford 2016-03-22 19:17:25 -04:00
rodzic 725ab4e11e
commit d2f64f0205
1 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -292,7 +292,14 @@ namespace embroideryReader
MessageBox.Show("File \"" + filename + "\" does not exist", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
design = new PesFile.PesFile(filename);
try
{
design = new PesFile.PesFile(filename);
}
catch(System.IO.IOException ioex)
{
MessageBox.Show("IOException while reading file \"" + filename + "\":" + Environment.NewLine + ioex.Message);
}
loadedFileName = filename;
if (design.getStatus() == PesFile.statusEnum.Ready)
{