Catch bad file, invalid csv, etc.
This commit is contained in:
parent
405fe94953
commit
f749914338
@ -414,6 +414,8 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
//Now we have a csv file. Try to parse it
|
//Now we have a csv file. Try to parse it
|
||||||
bool HadError = false;
|
bool HadError = false;
|
||||||
|
try
|
||||||
|
{
|
||||||
using (TextFieldParser parser = new TextFieldParser(mydialog.FileName))
|
using (TextFieldParser parser = new TextFieldParser(mydialog.FileName))
|
||||||
{
|
{
|
||||||
parser.TextFieldType = FieldType.Delimited;
|
parser.TextFieldType = FieldType.Delimited;
|
||||||
@ -467,6 +469,11 @@ namespace EduNetworkBuilder
|
|||||||
ShowInvalid("Password", InvalidPasswords);
|
ShowInvalid("Password", InvalidPasswords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception except)
|
||||||
|
{
|
||||||
|
MessageBox.Show(except.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void ShowInvalid(string What, List<string> BadUsers)
|
private void ShowInvalid(string What, List<string> BadUsers)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user