Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"minimum-stability": "dev",
"require": {
"opentracing/opentracing": "1.0.0-beta2",
"symfony/polyfill": "~1.7.0"
"symfony/polyfill": "~1.7.0",
"guzzlehttp/psr7": "^1.4@dev"
},
"require-dev": {
"phpunit/phpunit": "~5.7.19",
Expand Down
22 changes: 22 additions & 0 deletions src/DDTrace/Exceptions/InvalidSpanArgument.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace DDTrace\Exceptions;

use InvalidArgumentException;

final class InvalidSpanArgument extends InvalidArgumentException
{
public static function forTagKey($key)
{
return new self(
sprintf('Invalid key type in given span tags. Expected string, got %s.', gettype($key))
);
}

public static function forError($error)
{
return new self(
sprintf('Error should be either Exception or Throwable, got %s.', gettype($error))
);
}
}
Loading