|
4 | 4 |
|
5 | 5 | namespace Sentry; |
6 | 6 |
|
| 7 | +use Sentry\Util\DebugType; |
| 8 | + |
7 | 9 | /** |
8 | 10 | * This class represents hints on how to process an event. |
9 | 11 | */ |
@@ -56,19 +58,19 @@ public static function fromArray(array $hintData): self |
56 | 58 | $extra = $hintData['extra'] ?? []; |
57 | 59 |
|
58 | 60 | if ($exception !== null && !$exception instanceof \Throwable) { |
59 | | - throw new \InvalidArgumentException(\sprintf('The value of the "exception" field must be an instance of a class implementing the "%s" interface. Got: "%s".', \Throwable::class, get_debug_type($exception))); |
| 61 | + throw new \InvalidArgumentException(\sprintf('The value of the "exception" field must be an instance of a class implementing the "%s" interface. Got: "%s".', \Throwable::class, DebugType::getDebugType($exception))); |
60 | 62 | } |
61 | 63 |
|
62 | 64 | if ($mechanism !== null && !$mechanism instanceof ExceptionMechanism) { |
63 | | - throw new \InvalidArgumentException(\sprintf('The value of the "mechanism" field must be an instance of the "%s" class. Got: "%s".', ExceptionMechanism::class, get_debug_type($mechanism))); |
| 65 | + throw new \InvalidArgumentException(\sprintf('The value of the "mechanism" field must be an instance of the "%s" class. Got: "%s".', ExceptionMechanism::class, DebugType::getDebugType($mechanism))); |
64 | 66 | } |
65 | 67 |
|
66 | 68 | if ($stacktrace !== null && !$stacktrace instanceof Stacktrace) { |
67 | | - throw new \InvalidArgumentException(\sprintf('The value of the "stacktrace" field must be an instance of the "%s" class. Got: "%s".', Stacktrace::class, get_debug_type($stacktrace))); |
| 69 | + throw new \InvalidArgumentException(\sprintf('The value of the "stacktrace" field must be an instance of the "%s" class. Got: "%s".', Stacktrace::class, DebugType::getDebugType($stacktrace))); |
68 | 70 | } |
69 | 71 |
|
70 | 72 | if (!\is_array($extra)) { |
71 | | - throw new \InvalidArgumentException(\sprintf('The value of the "extra" field must be an array. Got: "%s".', get_debug_type($extra))); |
| 73 | + throw new \InvalidArgumentException(\sprintf('The value of the "extra" field must be an array. Got: "%s".', DebugType::getDebugType($extra))); |
72 | 74 | } |
73 | 75 |
|
74 | 76 | $hint->exception = $exception; |
|
0 commit comments