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.cr

Class Method Summary

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).


[View source]
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).


[View source]