I'm attempting to experiment a little with the FS and ran into an issue I don't really understand.
In the first screenshot there are the 2 source files I made.
1.function gets the input from the user, 2.function is supposed to check if their was an error with the input and if the input is a valid path.
In the second screenshot you can see that the first iteration (which doesn't really handle the errors, just dummies them down to Error 1 & 2) works with a valid path and if I cheat and write Error the first condition "recognizes" that there was an error and classifies it as Error 1, but if I enter anything else it reaches unreachable code, which I don't get.
Shouldn't the catch part after openDirAbsolute catch the error and return Error 2 instead?
Does anyone understand whats happening here? I have changed it hundreds of times into try statements and making the return type a "![]const u8" and catching in the main function and so on, but never got anything out of it that explained to me whats going on.