Skip to content

Commit 2cc0a17

Browse files
committed
Make assertionFailures fatalErrors
Should prevent compilation errors for certain schemes. Signed-off-by: Stephen Celis <stephen@stephencelis.com>
1 parent 0708a27 commit 2cc0a17

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

SQLite/Database.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ public final class Database {
513513
case SQLITE_TEXT:
514514
return String.fromCString(UnsafePointer(sqlite3_value_text(value)))!
515515
case let type:
516-
assertionFailure("unsupported value type: \(type)")
516+
fatalError("unsupported value type: \(type)")
517517
}
518518
}
519519
let result = block(args: arguments)
@@ -528,7 +528,7 @@ public final class Database {
528528
} else if result == nil {
529529
sqlite3_result_null(context)
530530
} else {
531-
assertionFailure("unsupported result type: \(result)")
531+
fatalError("unsupported result type: \(result)")
532532
}
533533
}
534534
return _SQLiteCreateFunction(self.handle, function, Int32(argc), deterministic ? 1 : 0, self.functions[function]?[argc])

SQLite/Statement.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public final class Statement {
105105
} else if let value = value as? Int {
106106
bind(value.datatypeValue, atIndex: idx)
107107
} else if let value = value {
108-
assertionFailure("tried to bind unexpected value \(value)")
108+
fatalError("tried to bind unexpected value \(value)")
109109
}
110110
}
111111

@@ -296,7 +296,7 @@ extension Cursor: SequenceType {
296296
case SQLITE_TEXT:
297297
return self[idx] as String
298298
case let type:
299-
assertionFailure("unsupported column type: \(type)")
299+
fatalError("unsupported column type: \(type)")
300300
}
301301
}
302302

0 commit comments

Comments
 (0)