[MLton-commit] r5241
Wesley Terpstra
wesley at mlton.org
Sat Feb 17 14:14:55 PST 2007
we can't handle these exceptions and they should be impossible, so freak out about them on stderr
----------------------------------------------------------------------
U mltonlib/trunk/ca/terpstra/sqlite3/query.sml
----------------------------------------------------------------------
Modified: mltonlib/trunk/ca/terpstra/sqlite3/query.sml
===================================================================
--- mltonlib/trunk/ca/terpstra/sqlite3/query.sml 2007-02-17 22:04:41 UTC (rev 5240)
+++ mltonlib/trunk/ca/terpstra/sqlite3/query.sml 2007-02-17 22:14:55 UTC (rev 5241)
@@ -77,7 +77,14 @@
fun iN0 (_, x) = (1, x)
local
- fun forceClose q = Prim.finalize q handle _ => ()
+ fun error s =
+ TextIO.output (TextIO.stdErr, "Finalization exception " ^ s ^ "\n")
+ fun forceClose q =
+ Prim.finalize q
+ handle Prim.Error x => error ("Error: " ^ x)
+ | Prim.Retry x => error ("Retry: " ^ x)
+ | Prim.Abort x => error ("Abort: " ^ x)
+ | _ => error ("unknown SML")
fun close l =
case Ring.get l of { db=_, query=_, available, used } =>
if !used <> 0 then raise Prim.Error "SQLite wrapper bug: finalizing in-use query" else
More information about the MLton-commit
mailing list