Skip to content

Commit

Permalink
Added more ugly excpetion handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator authored and Administrator committed Nov 28, 2017
1 parent 30d8e62 commit b299746
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions ImageScraper/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,12 @@ private void button7_Click(object sender, EventArgs e)

private void button8_Click(object sender, EventArgs e)
{
pictureBox1.Image.Save("dumpedImages/" + System.IO.Directory.GetFiles("dumpedImages").Length + ".png");
try {
pictureBox1.Image.Save("dumpedImages/" + System.IO.Directory.GetFiles("dumpedImages").Length + ".png");
}catch(Exception ex)
{
// lmao dont be stoopid
}
}

private void button10_Click(object sender, EventArgs e)
Expand All @@ -296,10 +301,15 @@ private void button10_Click(object sender, EventArgs e)

private void button9_Click(object sender, EventArgs e)
{
int tmp = rnd.Next(0,dumpedList.Count-1);

pictureBox1.Image = dumpedList[tmp];
try
{
int tmp = rnd.Next(0, dumpedList.Count - 1);

pictureBox1.Image = dumpedList[tmp];
}catch(Exception ex)
{
// lmao dont be stoopid
}
}
}
}

0 comments on commit b299746

Please sign in to comment.