---
title: PHASEError.Code.invalidObject
framework: PHASE
role: symbol
role_heading: Case
path: phase/phaseerror-swift.struct/code/invalidobject
---

# PHASEError.Code.invalidObject

An error that indicates an object is invalid in a specific context.

## Declaration

```swift
case invalidObject
```

## Discussion

Discussion The addChild(_:) function throws this error if the specified child already has a parent in the scene graph hierarchy.

## See Also

### Errors

- [PHASEError.Code.initializeFailed](phase/phaseerror-swift.struct/code/initializefailed.md)
