Skip to content

Commit 6aac319

Browse files
committed
badmethod call
1 parent 81dab62 commit 6aac319

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Tracing/Doctrine/DBAL/TracingDriverConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
namespace Sentry\SentryBundle\Tracing\Doctrine\DBAL;
66

7+
use BadMethodCallException;
78
use Doctrine\DBAL\Driver\Connection as DriverConnectionInterface;
89
use Doctrine\DBAL\Driver\Result;
910
use Doctrine\DBAL\Driver\Statement;
1011
use Doctrine\DBAL\ParameterType;
11-
use LogicException;
1212
use Sentry\State\HubInterface;
1313
use Sentry\Tracing\SpanContext;
1414

@@ -183,7 +183,7 @@ public function errorCode(): ?string
183183
public function getNativeConnection()
184184
{
185185
if (!method_exists($this->decoratedConnection, 'getNativeConnection')) {
186-
throw new LogicException(sprintf('The decoratedConnection %s does not support accessing the native connection.', \get_class($this->decoratedConnection)));
186+
throw new BadMethodCallException(sprintf('The connection "%s" does not support accessing the native connection.', \get_class($this->decoratedConnection)));
187187
}
188188

189189
return $this->decoratedConnection->getNativeConnection();

0 commit comments

Comments
 (0)