35 lines
		
	
	
		
			716 B
		
	
	
	
		
			Swift
		
	
	
		
		
			
		
	
	
			35 lines
		
	
	
		
			716 B
		
	
	
	
		
			Swift
		
	
	
|  | // MaxFusionError.swift | ||
|  | // Adapts MAX errors to FusionError interface | ||
|  | // Corresponds to MaxFusionError.kt in Android implementation | ||
|  | 
 | ||
|  | import Foundation | ||
|  | import AppLovinSDK | ||
|  | 
 | ||
|  | public class MaxFusionError: FusionError { | ||
|  |     private let maxError: MAError | ||
|  |      | ||
|  |     public init(_ maxError: MAError) { | ||
|  |         self.maxError = maxError | ||
|  |     } | ||
|  |      | ||
|  |     public var cause: Error? { | ||
|  |         return nil | ||
|  |     } | ||
|  |      | ||
|  |     public var info: String? { | ||
|  |         return nil | ||
|  |     } | ||
|  |      | ||
|  |     public var errorCode: Int { | ||
|  |         return maxError.code.rawValue | ||
|  |     } | ||
|  |      | ||
|  |     public var message: String { | ||
|  |         return maxError.message | ||
|  |     } | ||
|  |      | ||
|  |     public var waterfallName: String? { | ||
|  |         return maxError.waterfall?.name ?? "unknown" | ||
|  |     } | ||
|  | } |