Add ThemeNotFoundException
This commit is contained in:
parent
a6ad7597c8
commit
7bd2e3eecf
2 changed files with 50 additions and 30 deletions
|
|
@ -20,6 +20,11 @@ class Theme
|
|||
$this->id = $res['id'];
|
||||
$this->name = $res['name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->deconnexion();
|
||||
throw new ThemeNotFoundException();
|
||||
}
|
||||
$db->deconnexion();
|
||||
}
|
||||
}
|
||||
|
|
@ -137,3 +142,8 @@ class Theme
|
|||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
class ThemeNotFoundException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue