I've created an Error enum for a class I'm building:
enum QuestionDataHelperError: Error {
case NoResponseFromServer
case NoDataReturnedFromServer
case InvalidResponseFromServer
}
/// A Singleton which retrieves Question objects from the server
/// Access Singleton via .shared()
class QuestionDataHelper {
...
}
Currently I have the error enum in the global namespace above the class declaration, is this the correct way to go about it? Or should error enums have be in their own file?
Cheers!