adding public string function
This commit is contained in:
parent
9a6836f8aa
commit
23081102ae
|
@ -16,4 +16,23 @@ public enum StORMError: Error {
|
||||||
init(){
|
init(){
|
||||||
self = .noError
|
self = .noError
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func string() -> String {
|
||||||
|
switch self {
|
||||||
|
case .database:
|
||||||
|
return "No Database Specified"
|
||||||
|
|
||||||
|
case .noRecordFound:
|
||||||
|
return "No Record Found"
|
||||||
|
|
||||||
|
case .noError:
|
||||||
|
return "No Error"
|
||||||
|
|
||||||
|
case .notImplemented:
|
||||||
|
return "Not Implemented"
|
||||||
|
|
||||||
|
default:
|
||||||
|
return "Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue