Skip to content

v2.1.0

Choose a tag to compare

@peter-gribanov peter-gribanov released this 26 Jul 14:23
· 13 commits to master since this release

Changes

  • Created detector for detect errors in the response [#11].

    use AnimeDb\Bundle\AniDbBrowserBundle\Exception\BannedException;
    use AnimeDb\Bundle\AniDbBrowserBundle\Exception\NotFoundException;
    
    try {
        $content = $this->get('anime_db.ani_db.browser')->get('anime', ['aid' => 1]);
    } catch (BannedException $e) {
        // you are banned
    } catch (NotFoundException $e) {
        // anime not found
    } catch (\Exception $e) {
        // other exceptions
    }