00:01
Okay, this question wants us to take our methods from writing and reading these files, and what it wants us to do is create some error handling with try and catch clauses.
00:17
So really, the only way we could have something go wrong here is if the path of our file is messed up.
00:26
So i'm going to make try clause and a catch clause first for the stream writer.
00:41
So if everything goes to plan, we're not going to have any issues, and that executes.
00:48
But if not, it's probably an issue with the path.
00:51
So we get a file not found exception.
00:57
And for that, i'll just do a console dot right in line and say error.
01:13
File could not be accessed writing.
01:24
And then similarly, because it wants two, and actually we're going to have to move this up now too.
01:43
Now we're going to do the same thing, but for the stream reader.
01:50
We're going to try and get it to read.
01:58
So in an ideal world, we would like all of this to execute.
02:06
So we're going to put that in here.
02:07
It's not always going to happen...