summaryrefslogtreecommitdiff
path: root/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php')
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php b/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php
new file mode 100644
index 000000000..de7d907c8
--- /dev/null
+++ b/vendor/opentracing/opentracing/src/OpenTracing/InvalidReferencesSetException.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTracing;
+
+use DomainException;
+
+/**
+ * Thrown when a reference has more than one parent in the SpanOptions
+ */
+final class InvalidReferencesSetException extends DomainException
+{
+ /**
+ * @param string $message
+ * @return InvalidReferencesSetException
+ */
+ public static function create(string $message): InvalidReferencesSetException
+ {
+ return new self($message);
+ }
+
+ /**
+ * @return InvalidReferencesSetException
+ */
+ public static function forMoreThanOneParent(): InvalidReferencesSetException
+ {
+ return new self('Span can not have more than one parent, either one as child_of or either one as follows_from');
+ }
+}