Skip to content

Commit 7fb8ac3

Browse files
authored
Merge pull request #637 from FrankGiesecke/635-fix-wrong-exceptions-in-transports
Fix wrong exceptions in transports
2 parents 1f96246 + 431ed59 commit 7fb8ac3

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

pkg/gearman/GearmanProducer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Interop\Queue\Destination;
88
use Interop\Queue\Exception\InvalidDestinationException;
99
use Interop\Queue\Exception\InvalidMessageException;
10+
use Interop\Queue\Exception\PriorityNotSupportedException;
1011
use Interop\Queue\Message;
1112
use Interop\Queue\Producer;
1213

@@ -59,7 +60,7 @@ public function setPriority(int $priority = null): Producer
5960
return $this;
6061
}
6162

62-
throw new \LogicException('Not implemented');
63+
throw PriorityNotSupportedException::providerDoestNotSupportIt();
6364
}
6465

6566
public function getPriority(): ?int

pkg/pheanstalk/PheanstalkProducer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Interop\Queue\Destination;
88
use Interop\Queue\Exception\InvalidDestinationException;
99
use Interop\Queue\Exception\InvalidMessageException;
10+
use Interop\Queue\Exception\PriorityNotSupportedException;
1011
use Interop\Queue\Message;
1112
use Interop\Queue\Producer;
1213
use Pheanstalk\Pheanstalk;
@@ -75,7 +76,7 @@ public function setPriority(int $priority = null): Producer
7576
return $this;
7677
}
7778

78-
throw new \LogicException('Not implemented');
79+
throw PriorityNotSupportedException::providerDoestNotSupportIt();
7980
}
8081

8182
public function getPriority(): ?int

pkg/rdkafka/RdKafkaProducer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Interop\Queue\Destination;
88
use Interop\Queue\Exception\InvalidDestinationException;
99
use Interop\Queue\Exception\InvalidMessageException;
10+
use Interop\Queue\Exception\PriorityNotSupportedException;
1011
use Interop\Queue\Message;
1112
use Interop\Queue\Producer;
1213
use RdKafka\Producer as VendorProducer;
@@ -70,7 +71,7 @@ public function setPriority(int $priority = null): Producer
7071
return $this;
7172
}
7273

73-
throw new \LogicException('Not implemented');
74+
throw PriorityNotSupportedException::providerDoestNotSupportIt();
7475
}
7576

7677
public function getPriority(): ?int

pkg/redis/RedisProducer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Interop\Queue\Destination;
88
use Interop\Queue\Exception\InvalidDestinationException;
99
use Interop\Queue\Exception\InvalidMessageException;
10+
use Interop\Queue\Exception\PriorityNotSupportedException;
1011
use Interop\Queue\Message;
1112
use Interop\Queue\Producer;
1213
use Ramsey\Uuid\Uuid;
@@ -94,7 +95,7 @@ public function setPriority(int $priority = null): Producer
9495
return $this;
9596
}
9697

97-
throw new \LogicException('Not implemented');
98+
throw PriorityNotSupportedException::providerDoestNotSupportIt();
9899
}
99100

100101
public function getPriority(): ?int

pkg/stomp/StompProducer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Interop\Queue\Destination;
88
use Interop\Queue\Exception\InvalidDestinationException;
99
use Interop\Queue\Exception\InvalidMessageException;
10+
use Interop\Queue\Exception\PriorityNotSupportedException;
1011
use Interop\Queue\Message;
1112
use Interop\Queue\Producer;
1213
use Stomp\Client;
@@ -64,7 +65,7 @@ public function setPriority(int $priority = null): Producer
6465
return $this;
6566
}
6667

67-
throw new \LogicException('Not implemented');
68+
throw PriorityNotSupportedException::providerDoestNotSupportIt();
6869
}
6970

7071
public function getPriority(): ?int

0 commit comments

Comments
 (0)