This has no real effect right now but will be useful in a moment.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
}
set context [pg_result $sh -error context]
set emsg "db exec failed ($status, $sqlstate) $emsg"
+ set ecode OSSTEST-PSQL
+ if {![string length $sqlstate] &&
+ [string match {SSL SYSCALL *} $emsg]} {
+ # sadly the pg client library doesn't provide a code
+ # for this so we match the error message
+ set ecode OSSTEST-PSQL-SSL-SYSCALL
+ }
error $emsg \
"$emsg\n while executing SQL\n$stmt\n in SQL context\n$context" \
- [list OSSTEST-PSQL $status $sqlstate]
+ [list $ecode $status $sqlstate]
}
uplevel 1 $body
} emsg]