function DebugScope::detach
Overrides ScopeInterface::detach
File
-
vendor/
open-telemetry/ context/ DebugScope.php, line 42
Class
- DebugScope
- @internal
Namespace
OpenTelemetry\ContextCode
public function detach() : int {
$this->detachedAt ??= debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
$flags = $this->scope
->detach();
if (($flags & ScopeInterface::DETACHED) !== 0) {
trigger_error(sprintf('Scope: unexpected call to Scope::detach() for scope #%d, scope was already detached %s', spl_object_id($this), self::formatBacktrace($this->detachedAt)));
}
elseif (($flags & ScopeInterface::MISMATCH) !== 0) {
trigger_error(sprintf('Scope: unexpected call to Scope::detach() for scope #%d, scope successfully detached but another scope should have been detached first', spl_object_id($this)));
}
elseif (($flags & ScopeInterface::INACTIVE) !== 0) {
trigger_error(sprintf('Scope: unexpected call to Scope::detach() for scope #%d, scope successfully detached from different execution context', spl_object_id($this)));
}
return $flags;
}