refactor logging functions

This commit is contained in:
John Rommel Estropia
2015-02-28 11:32:41 +09:00
parent 59cd505dc6
commit 55dee6ec2f
11 changed files with 151 additions and 118 deletions

View File

@@ -46,7 +46,7 @@ public /*abstract*/ class DataTransaction {
public func create<T: NSManagedObject>(entity: T.Type) -> T {
HardcoreData.assert(self.transactionQueue.isCurrentExecutionContext() == true, "Attempted to create an entity of type \(entity) outside a transaction queue.")
HardcoreData.assert(!self.isCommitted, "Attempted to create an NSManagedObject from an already committed \(self.dynamicType).")
HardcoreData.assert(!self.isCommitted, "Attempted to create an entity of type \(entity) from an already committed \(self.dynamicType).")
return T.createInContext(self.context)
}