2009/3/14 Gü?nther Schmidt <gue.schm...@web.de>:
> Hi,
>
> can someone please point me to error handling examples with takusen?
>
> I try to run a piece of code with takusen but just get the very sparse
> "Database.InternalEnumerator.DBException

Hello Günther,

We use dynamic exceptions in Takusen, which is why you don't get much
useful information when an exception is thrown. We will include the
new extensible-exceptions code in the next release, so once that it
done perhaps we can change the way we do exceptions so that you get
better messages by default.

There are some basic exception handling functions in
Database.Enumerator which should help. Firstly, you need to add an
exception handler with catchDB. Then you can choose to ignore the
error, report it, or re-raise it (see basicDBExceptionReporter and
reportRethrow). Also, the DBException constructors are exported, so
you can pattern match on it to extract more information, like
SqlState, error number, and error message.

Alistair
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to