Skip to content

Commit

Permalink
Fix error logger issue
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif committed Jan 23, 2024
1 parent b5d7fb6 commit c64549c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ open class ApplicationLogger {
print(message())
}

open func error(_ error: Error, message: String?) {
open func error(_ error: Error, message: String? = nil) {
guard let message else {
return print("Error: \(error.localizedDescription)")
}

print("\(message) (Error: \(error.localizedDescription))")
}

open func error(_ message: String) {
print("Error: \(message)")
}
}
#endif

0 comments on commit c64549c

Please sign in to comment.