Skip to content

Commit

Permalink
New exception added
Browse files Browse the repository at this point in the history
  • Loading branch information
Oguzhan Uysal committed Apr 1, 2017
1 parent 6cf20e8 commit 53ec53e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/Exception/TransformationException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Created by PhpStorm.
* User: oguzu
* Date: 1-4-2017
* Time: 14:24
*/

namespace Pbxg33k\MusicInfo\Exception;


class TransformationException extends \Exception
{

}
3 changes: 2 additions & 1 deletion src/Service/Spotify/Endpoint/Track.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace Pbxg33k\MusicInfo\Service\Spotify\Endpoint;

use Doctrine\Common\Collections\ArrayCollection;
use Pbxg33k\MusicInfo\Exception\TransformationException;
use Pbxg33k\MusicInfo\Model\IMusicServiceEndpoint;
use GuzzleHttp\Psr7\Uri;
use Pbxg33k\MusicInfo\Exception\MethodNotImplementedException;
Expand Down Expand Up @@ -78,7 +79,7 @@ public function transformCollection($raw)
return $collection;
}

throw new \Exception('Transformation failed');
throw new TransformationException('Expected object');
}

/**
Expand Down

0 comments on commit 53ec53e

Please sign in to comment.