[erlang-patches] ODBC extended error information

Bernie Duggan <>
Thu Jul 26 08:59:47 CEST 2012

I neglected to mention that credit (or blame ;)) for the original code
should go to my colleague Franko Franicevich.



On 25 July 2012 17:44, Bernie Duggan <> wrote:
> Hi all,
> This patch adds an option to ODBC to allow for extended error reports.
> The standard ODBC error reasons are, in some circumstances, not
> sufficient for sophisticated error handling. Enabling the
> 'extended_errors' option on an ODBC connection alters the error return
> type from {error, Reason} to {error, {ODBCErrorCode, NativeErrorCode,
> Reason}}. The NativeErrorCode is that returned by the underlying
> database and can be useful when that database type is known and
> specialised error handling is desired.
> I did my best to figure out how to add some tests for this change, but
> from talking to a couple of other people I'm not alone in having
> difficulty even getting the ODBC suite running :) Following the
> instructions on the github wiki page just gives me a
> port_program_executable_not_found error. I'm happy to try harder to
> add some tests if someone can give me a hand with this.
> You can grab the changes with
> git fetch git://github.com/bernardd/otp.git odbc_extended_errors
> Cheers,
> Bernard

More information about the erlang-patches mailing list