---
title: "MTStyleError | Mobile sdk | Mobile sdk ios | Ios"
description: "Represents the exceptions raised by the MTStyle object."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTStyleError

```
public enum MTStyleError : Error
```

Represents the exceptions raised by the MTStyle object.

-   `[sourceAlreadyExists](#/s:11MapTilerSDK12MTStyleErrorO19sourceAlreadyExistsyA2CmF)`
    
    Source with the same id already added to the map.
    
    #### Declaration
    
    Swift
    
    ```
    case sourceAlreadyExists
    ```
    
-   `[sourceNotFound](#/s:11MapTilerSDK12MTStyleErrorO14sourceNotFoundyA2CmF)`
    
    Source does not exist in the map.
    
    #### Declaration
    
    Swift
    
    ```
    case sourceNotFound
    ```
    
-   `[layerAlreadyExists](#/s:11MapTilerSDK12MTStyleErrorO18layerAlreadyExistsyA2CmF)`
    
    Layer with the same id already added to the map.
    
    #### Declaration
    
    Swift
    
    ```
    case layerAlreadyExists
    ```
    
-   `[layerNotFound](#/s:11MapTilerSDK12MTStyleErrorO13layerNotFoundyA2CmF)`
    
    Layer does not exist in the map.
    
    #### Declaration
    
    Swift
    
    ```
    case layerNotFound
    ```
