Commit b8e3b4b9 authored by Armando Lüscher's avatar Armando Lüscher

Fix exception handling for ConversationDB.

parent 7db0a913
......@@ -11,6 +11,7 @@
namespace Longman\TelegramBot;
use Longman\TelegramBot\DB;
use Longman\TelegramBot\Exception\TelegramException;
/**
* Class ConversationDB
......@@ -63,7 +64,7 @@ class ConversationDB extends DB
$results = $sth->fetchAll(\PDO::FETCH_ASSOC);
} catch (PDOException $e) {
} catch (\Exception $e) {
throw new TelegramException($e->getMessage());
}
return $results;
......@@ -106,7 +107,7 @@ class ConversationDB extends DB
$sth->bindParam(':date', $created_at);
$status = $sth->execute();
} catch (PDOException $e) {
} catch (\Exception $e) {
throw new TelegramException($e->getMessage());
}
return $status;
......@@ -178,7 +179,7 @@ class ConversationDB extends DB
try {
$sth = self::$pdo->prepare($query);
$status = $sth->execute($tokens);
} catch (PDOException $e) {
} catch (\Exception $e) {
throw new TelegramException($e->getMessage());
}
return $status;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment