Throw when prepare fails
PeeHaa opened this issue · comments
Pieter Hordijk commented
AFAICS currently preparing a statement fails silently.
You will only find out it failed when trying to execute the statement resulting in the somewhat less useful message:
error Amp\Postgres\QueryError: ERROR: prepared statement "amp_46cfa66905e07b1e3b52558541a4bcf486056883" does not exist
Would be nice if errors on prepare would throw instead. So we have:
- the error at the location it actually fails
- have access to the actual error message.