module
CQL::Postgres::Refusal
Overview
Transport failures while opening a connection become DB::ConnectionRefused,
which crystal-db's pool retries and callers already rescue; server errors do not.
Defined in:
postgres/refusal.crClass Method Summary
-
.refuse(ex : Exception, log : Bool = true) : NoReturn
crystal-db's pool drops the cause when its retries run out, so say why here (the message names no secret).
-
.translate(log : Bool = true, & : -> T) : T forall T
log writes a warning naming the cause: wanted where crystal-db's pool retries and drops the cause, not on every checkout of an engine pool during an outage (the exception carries the cause).
Class Method Detail
def self.refuse(ex : Exception, log : Bool = true) : NoReturn
#
crystal-db's pool drops the cause when its retries run out, so say why here (the message names no secret).
def self.translate(log : Bool = true, & : -> T) : T forall T
#
log writes a warning naming the cause: wanted where crystal-db's pool retries and drops the cause, not on every checkout of an engine pool during an outage (the exception carries the cause).