SQLite.swift
SQLite.swift copied to clipboard
EXC_BREAKPOINT String.wrap<T>
I got one sentry related to this. this is not reproducible but one of my client has faced this.
at the time of creating table using try! db.run(table.create(ifNotExists: true) { t in inside create method, in below code block
let clauses: [Expressible?] = [ create(Table.identifier, tableName(), temporary ? .temporary : nil, ifNotExists), "".wrap(builder.definitions) as Expression<Void>, withoutRowid ? Expression<Void>(literal: "WITHOUT ROWID") : nil ]
"".wrap(builder.definitions) as Expression<Void> => May be due to below reason crash happen
builder.definitions is empty then crash happen
And also second crash in Screenshot you can see. below is code for it.
`extension Expressible {
// naïve compiler for statements that can’t be bound, e.g., CREATE TABLE
// FIXME: make internal (0.13.0)
public func asSQL() -> String {
let expressed = expression
var idx = 0
return expressed.template.reduce("") { template, character in
let transcoded: String
if character == "?" {
transcoded = transcode(expressed.bindings[idx])
idx += 1
} else {
transcoded = String(character)
}
return template + transcoded
}
}
}`