Skip to content

Commit

Permalink
💫 Update: RNIBaseError+Helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed May 12, 2023
1 parent 7f2e0f5 commit b8c7bf2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ios/src_library/React Native/RNIError/RNIBaseError+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,26 @@ extension RNIBaseError {
self.functionName = functionName;
self.lineNumber = lineNumber;
};

public init(
code: ErrorCode,
error: Error,
debugMessage: String? = nil,
debugData: Dictionary<String, Any>? = nil,
fileID: String? = #fileID,
functionName: String? = #function,
lineNumber: Int? = #line
) {
self.init(
code: code,
message: error.localizedDescription,
debugMessage: debugMessage
);

self.fileID = fileID;
self.functionName = functionName;
self.lineNumber = lineNumber;
};

public mutating func setDebugValues(
fileID: String = #fileID,
Expand Down

0 comments on commit b8c7bf2

Please sign in to comment.