Exception classes
The package contains base exception interface \sad_spirit\pg_builder\Exception and several specialized exception
classes that extend SPL Exception classes and implement
this interface. Therefore all exceptions thrown in pg_builder can be caught with
use sad_spirit\pg_builder\Exception;
try {
// Do some query parsing and building
} catch (Exception $e) {
// Handle exception
}
All exception classes belong to sad_spirit\pg_builder\exceptions
namespace:
BadMethodCallException extends \BadMethodCallExceptionNamespaced version of SPL’s BadMethodCallException. Thrown by
Parser::__call()for unavailable methods.InvalidArgumentException extends \InvalidArgumentExceptionNamespaced version of SPL’s InvalidArgumentException.
RuntimeException extends \RuntimeExceptionNamespaced version of SPL’s RuntimeException.
NotImplementedException extends RuntimeExceptionThrown for not-quite-ready features.
SyntaxException extends \DomainExceptionThrown for parsing failures. This is the most common exception you’ll get when using pg_builder.