grandwazoo
(The Grand Wazoo)
1
I'm working through this tutorial on using the ArgumentParser package. Some of the code doesn't compile and I couldn't find any information on the class/struct RuntimeError when I google for it, is this just a madeup class that they forgot to define when writing this tutorial?
guard let input = try? String(contentsOfFile: inputFile) else {
throw RuntimeError("Couldn't read from '\(inputFile)'!")
}
bzamayo
(Benjamin Mayo)
2
It is defined at the bottom of the full code snippet on that page, but yes it’s just a thin example error type:
1 Like
grandwazoo
(The Grand Wazoo)
3
Oh geez, it's right there! Next time I should try Cmd-F and search for it on the page. Thanks for pointing it out.