catch exception in model from pdo