Open wilzbach opened 7 years ago
Errors from prepare
:
string* pos = 'P' in error.fields;
if (pos && (*pos).to!size_t < query.length) {
size_t idx = (*pos).to!size_t;
size_t start;
if (idx > 10)
start = idx - 10;
else start = 0;
size_t end = min(query.length, idx + 20);
details ~= "\n'" ~ query[start .. end].replace("\t", " ").replace("\n", " ").to!string ~ "'\n ^";
}
super("Could not execute query '" ~ query ~ "' => " ~ details, fn, ln);