13 #ifndef PQXX_H_ERRORHANDLER
14 #define PQXX_H_ERRORHANDLER
16 #include "pqxx/compiler-public.hxx"
17 #include "pqxx/compiler-internal-pre.hxx"
19 #include "pqxx/types.hxx"
28 class errorhandler_connection_base;
65 virtual bool operator()(
const char msg[]) noexcept =0;
70 friend class internal::gate::errorhandler_connection_base;
71 void unregister() noexcept;
85 virtual bool operator()(
const char[]) noexcept
override {
return false; }
94 #include "pqxx/compiler-internal-post.hxx"
An error handler that suppresses any previously registered error handlers.
Definition: errorhandler.hxx:80
quiet_errorhandler(connection_base &conn)
Definition: errorhandler.hxx:83
Private namespace for libpqxx's internal use; do not access.
Definition: connection_base.hxx:43
const char * name_encoding(int encoding_id)
Definition: encodings.cxx:631
encoding_group enc_group(int libpq_enc_id)
Definition: encodings.cxx:637
Base class for error-handler callbacks.
Definition: errorhandler.hxx:54
virtual bool operator()(const char[]) noexcept override
Define in subclass: receive an error or warning message from the database.
Definition: errorhandler.hxx:85
glyph_scanner_func * get_glyph_scanner(encoding_group enc)
Definition: encodings.cxx:738
Invalid argument passed to libpqxx, similar to std::invalid_argument.
Definition: except.hxx:229
virtual ~errorhandler()
Definition: errorhandler.cxx:30
std::string to_string(const field &Obj)
Convert a field to a string.
Definition: result.cxx:451
connection_base abstract base class; represents a connection to a database.
Definition: connection_base.hxx:139
std::string::size_type find_with_encoding(encoding_group enc, const std::string &haystack, char needle, std::string::size_type start)
Definition: encodings.cxx:790
F * for_encoding(encoding_group enc)
Look up instantiation T<enc>::call at runtime.
Definition: encodings.cxx:707
errorhandler(connection_base &)
Definition: errorhandler.cxx:23
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:25
Error in usage of libpqxx library, similar to std::logic_error.
Definition: except.hxx:218