# `GSGlyph decomposeAndCleanupError:`

*Instance Method*

Prepares compatible interpolation layers for TrueType curve conversion.

## Declaration

```swift
func decomposeAndCleanupError() throws
```

```objc
- (BOOL) decomposeAndCleanupError:(NSError **) error;
```

```python
decomposeAndCleanupError_() -> tuple[bool, NSError]
```

## Parameters

- `error` — On return, an error caused by invalid path structure.

## Return Value

Whether the layers were compatible and preparation succeeded.

## Discussion

Components that cannot remain compatible are decomposed, component anchors are materialized when needed, and paths are cleaned up and validated. Hints are retained for the subsequent conversion.

## See Also

### Curve Conversion

- [`GSGlyph convertToCompatibleTrueTypeWithError:ignoreIncompatible:error:`](/Core/GlyphsCore/GSGlyph/convertToCompatibleTrueTypeWithError:ignoreIncompatible:error:) — Converts the glyph’s compatible interpolation layers to quadratic curves.
- [`GSGlyph convertToCompatibleTrueType:curveError:error:`](/Core/GlyphsCore/GSGlyph/convertToCompatibleTrueType:curveError:error:) — Converts specified compatible layers to quadratic curves.
- [`GSGlyph convertPath:toTrueTypeWithError:error:`](/Core/GlyphsCore/GSGlyph/convertPath:toTrueTypeWithError:error:) — Converts cubic segments that can be approximated within a tolerance to quadratic segments.
- [`GSGlyph decomposeAndCleanupError:ignoreIncompatible:`](/Core/GlyphsCore/GSGlyph/decomposeAndCleanupError:ignoreIncompatible:) — Prepares selected interpolation layers for TrueType curve conversion.
- [`GSGlyph decomposeBracketLayersSubstitutions:error:`](/Core/GlyphsCore/GSGlyph/decomposeBracketLayersSubstitutions:error:) — Separates Alternative layer groups into glyphs for variable-font substitution.

