Skip to content
Snippets Groups Projects
Commit ae66a8de authored by Tyler Antonio's avatar Tyler Antonio
Browse files

Fixed namespace for PDOException/Exception

parent 77933d81
No related branches found
No related tags found
No related merge requests found
...@@ -125,8 +125,8 @@ class Database { ...@@ -125,8 +125,8 @@ class Database {
$db->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $db->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
return $db; return $db;
} catch(PDOException $e){ } catch(\PDOException $e){
throw new Exception("Database error: ". $e->getMessage()); throw new \Exception("Database error: ". $e->getMessage());
} }
} }
...@@ -186,8 +186,8 @@ class Database { ...@@ -186,8 +186,8 @@ class Database {
$query->execute(); $query->execute();
return $query; return $query;
} catch (PDOException $e){ } catch (\PDOException $e){
throw new Exception("Database error: ". $e->getMessage()); throw new \Exception("Database error: ". $e->getMessage());
} }
} }
...@@ -209,8 +209,8 @@ class Database { ...@@ -209,8 +209,8 @@ class Database {
$query = $db->exec($stmt); $query = $db->exec($stmt);
return $query; return $query;
} catch (PDOException $e){ } catch (\PDOException $e){
throw new Exception("Database error: ". $e->getMessage()); throw new \Exception("Database error: ". $e->getMessage());
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment