# Exceptions

When a cairo function or method call fails an cairo.Error exception, or a subclass thereof, is raised.

## cairo.Error()

exception `cairo.``Error`

  This exception is raised when a cairo object returns an error status.

  `status`

    Type: | `cairo.Status`

exception `cairo.``CairoError`

  An alias for `Error`

  New in version 1.12.0.

exception `cairo.``MemoryError`

  Bases: | `Error`, `python3:MemoryError`

  New in version 1.15: Prior to 1.15 `python3:MemoryError` was raised instead of this type.

exception `cairo.``IOError`

  Bases: | `Error`, `python3:IOError`

  New in version 1.15: Prior to 1.15 `python3:IOError` was raised instead of this type.