getCode()) { case '42S02': return self::createTableViewException($e); default: return $e; } } /** * Constructor. * * @param \PDOException $e Exception * * @return \PDOException * * @since 1.0.0 */ public static function createExceptionMessage(\PDOException $e) : \PDOException { switch ($e->getCode()) { case '42S02': return self::createTableViewExceptionMessage($e); default: return $e; } } /** * Create table exception. * * @param \PDOException $e Exception * * @return \PDOException * * @since 1.0.0 */ private static function createTableViewException(\PDOException $e) : string { return TableException::findTable($e->getMessage()); } }