Impressia/CoreData/CoreDataError.swift

19 lines
452 B
Swift
Raw Normal View History

2023-03-11 18:30:33 +01:00
//
// https://mczachurski.dev
// Copyright © 2023 Marcin Czachurski and the repository contributors.
2023-03-28 10:35:38 +02:00
// Licensed under the Apache License 2.0.
2023-03-11 18:30:33 +01:00
//
2023-03-11 18:30:33 +01:00
import Foundation
2023-10-01 18:45:49 +02:00
import OSLog
import EnvironmentKit
2023-03-11 18:30:33 +01:00
public class CoreDataError {
public static let shared = CoreDataError()
private init() { }
2023-03-11 18:30:33 +01:00
public func handle(_ error: Error, message: String) {
2023-10-01 18:45:49 +02:00
Logger.main.error("Error ['\(message)']: \(error.localizedDescription)")
2023-03-11 18:30:33 +01:00
}
}