Skip to content

Commit

Permalink
Change done function to throw UnsupportedException
Browse files Browse the repository at this point in the history
  • Loading branch information
fcastilloes committed Dec 1, 2017
1 parent faf0fd4 commit 4115e6a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace Katana\Sdk\Api;
use Katana\Sdk\Component\Component;
use Katana\Sdk\Exception\UnsupportedException;
use Katana\Sdk\Logger\RequestKatanaLogger;
use Katana\Sdk\Schema\Mapping;
use Katana\Sdk\Schema\ServiceSchema;
Expand Down Expand Up @@ -238,6 +239,6 @@ public function getServiceSchema(
*/
public function done(): bool
{
return false;
throw new UnsupportedException('SDK does not support async call to end action: Api.done()');
}
}
21 changes: 21 additions & 0 deletions src/Exception/UnsupportedException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* PHP 7 SDK for the KATANA(tm) Framework (http://katana.kusanagi.io)
* Copyright (c) 2016-2017 KUSANAGI S.L. All rights reserved.
*
* Distributed under the MIT license
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*
* @link https://github.com/kusanagi/katana-sdk-php7
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @copyright Copyright (c) 2016-2017 KUSANAGI S.L. (http://kusanagi.io)
*/

namespace Katana\Sdk\Exception;

class UnsupportedException extends \RuntimeException
{

}

0 comments on commit 4115e6a

Please sign in to comment.