#include "sqlite.hh" #include "util.hh" #include namespace nix { [[noreturn]] void throwSQLiteError(sqlite3 * db, const format & f) { int err = sqlite3_errcode(db); if (err == SQLITE_BUSY || err == SQLITE_PROTOCOL) { if (err == SQLITE_PROTOCOL) printMsg(lvlError, "warning: SQLite database is busy (SQLITE_PROTOCOL)"); else { static bool warned = false; if (!warned) { printMsg(lvlError, "warning: SQLite database is busy"); warned = true; } } /* Sleep for a while since retrying the transaction right away is likely to fail again. */ #if HAVE_NANOSLEEP struct timespec t; t.tv_sec = 0; t.tv_nsec = (random() % 100) * 1000 * 1000; /* <= 0.1s */ nanosleep(&t, 0); #else sleep(1); #endif throw SQLiteBusy(format("%1%: %2%") % f.str() % sqlite3_errmsg(db)); } else throw SQLiteError(format("%1%: %2%") % f.str() % sqlite3_errmsg(db)); } SQLite::~SQLi
aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/fltk.scm
diff options
context:
space:
mode:
authorzimoun <zimon.toutoune@gmail.com>2020-10-30 15:52:53 +0100
committerRicardo Wurmus <rekado@elephly.net>2020-12-09 12:12:28 +0100
commit59fafa19f5d3cae3c50c8b67e46215ee88ca7767 (patch)
tree7169684a9764aedd14415139fef30259cc950426 /gnu/packages/fltk.scm
parentd176ad34d757d5f8bc26ab3399075b32bbcbe298 (diff)
downloadguix-59fafa19f5d3cae3c50c8b67e46215ee88ca7767.tar.gz
guix-59fafa19f5d3cae3c50c8b67e46215ee88ca7767.zip
gnu: r-zfpkm: Update to 1.12.0.
* gnu/packages/bioconductor.scm (r-zfpkm): Update to 1.12.0.
Diffstat (limited to 'gnu/packages/fltk.scm')
0 files changed, 0 insertions, 0 deletions