Skip to content

Commit

Permalink
fix(GiniCaptureSDK): Add GiniErrorAnalytics struct to capture error d…
Browse files Browse the repository at this point in the history
…etails for analytics

PP-926
  • Loading branch information
ValentinaIancu-Gini committed Feb 3, 2025
1 parent be3743e commit 105e93e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@

import Foundation

/// Represents an error event for analytics, capturing its type, optional error code, and reason.
public struct GiniErrorAnalytics {
public let type: String
public let code: Int?
public let reason: String?

/// Initializes a GiniErrorAnalytics instance with the given error details.
/// - Parameters:
/// - type: The category or identifier of the error.
/// - code: An optional numerical code representing the error.
/// - reason: An optional descriptive reason for the error.
init(type: String, code: Int? = nil, reason: String? = nil) {
self.type = type
self.code = code
Expand Down

0 comments on commit 105e93e

Please sign in to comment.