[Shared] Fixes pattern matching non-ALTErrorEnum error codes

This commit is contained in:
Riley Testut
2022-12-20 14:01:54 -06:00
committed by Magesh K
parent d54b7aa3bf
commit 624c4086f1
2 changed files with 32 additions and 1 deletions

View File

@@ -102,7 +102,7 @@ public extension ALTErrorCode
{
static var errorDomain: String {
let typeName = String(reflecting: Self.self) // "\(Self.self)" doesn't include module name, but String(reflecting:) does.
let errorDomain = typeName.replacingOccurrences(of: "ErrorCode", with: "Error")
let errorDomain = typeName.replacingOccurrences(of: "ErrorCode", with: "Error").replacingOccurrences(of: "Error.Code", with: "Error")
return errorDomain
}
}