Skip to content

Commit eba522d

Browse files
committed
Make all exceptions implement a common interface
1 parent d9f2897 commit eba522d

4 files changed

+13
-3
lines changed

src/Exception/EtcdException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
/**
88
* @author Cong Peijun <p.cong@linkorb.com>
99
*/
10-
class EtcdException extends Exception
10+
class EtcdException extends Exception implements ExceptionInterface
1111
{
1212
}

src/Exception/ExceptionInterface.php

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace ActiveCollab\Etcd\Exception;
4+
5+
/**
6+
* @package ActiveCollab\Etcd\Exception
7+
*/
8+
interface ExceptionInterface
9+
{
10+
}

src/Exception/KeyExistsException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
/**
66
* @author Cong Peijun <p.cong@linkorb.com>
77
*/
8-
class KeyExistsException extends EtcdException
8+
class KeyExistsException extends EtcdException implements ExceptionInterface
99
{
1010
}

src/Exception/KeyNotFoundException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
/**
66
* @author Cong Peijun <p.cong@linkorb.com>
77
*/
8-
class KeyNotFoundException extends EtcdException
8+
class KeyNotFoundException extends EtcdException implements ExceptionInterface
99
{
1010
}

0 commit comments

Comments
 (0)