getCode()) { case '42S02': return '\phpOMS\DataStorage\Database\Schema\Exception\TableException'; default: return '\PDOException'; } } /** * Constructor. * * @param \PDOException $e Exception * * @return string * * @since 1.0.0 */ public static function createExceptionMessage(\PDOException $e) : string { switch ($e->getCode()) { case '42S02': return TableException::findTable($e->getMessage()); default: return $e->getMessage(); } } }