You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for getting in touch. I'll close this as a duplicate of #426, but I'd be interested to know what your ideal behaviour would be in this scenario.
e.g. We could add a catch block and put a warning inside, then link to a page explaining how to add error handling in C#:
Ideally to handle specific exceptions with try blocks that are as small and targeted as possible, or to check for an issue that would cause an exception up front
privatevoidButton3_Click(objectsender,EventArgse){try{varSaveFileDialog=newSaveFileDialog();inti;SaveFileDialog.Title="Save List.txt";SaveFileDialog.Filter="List.txt File (*.txt)|*.txt";if(SaveFileDialog.ShowDialog==DialogResult.OK){vars=newStreamWriter(SaveFileDialog.FileName,true);varloopTo=ListBox1.Items.Count-1;for(i=0;i<=loopTo;i++)s.WriteLine(ListBox1.Items.Item(i));s.Close();mginvoke(newAction(()=>note.msg(Conversion.str.str24)));}}catch(Exceptione){
#warning Conversion issue: "On Error Resume Next" removed, please add error handling here
// See https://github.com/icsharpcode/CodeConverter/wiki/OnErrorResumeNext for more information}}
VB.Net input code
The text was updated successfully, but these errors were encountered: