StaticMaps.TileError exception (staticmaps v0.1.1)

Copy Markdown View Source

The error returned when one or more tiles a render needed could not be used.

:source is the source module the tiles came from. :tiles pairs each failed tile key {z, x, y} with the reason:

  • the reason from a source's {:error, reason}
  • {:invalid_return, value} when fetch/2 returned something other than {:ok, binary} or {:error, reason}
  • {:exception, exception} when the source raised, or {:crashed, reason} when it exited
  • :timeout when the tile had not arrived within 60 seconds of the render asking for it
  • {:truncated, format} for a PNG, JPEG or WebP cut short
  • {:undecodable, message} for bytes that are not an image
  • {:wrong_size, actual, expected} for an image whose size does not match the source's info/1

Summary

Types

t()

@type t() :: %StaticMaps.TileError{
  __exception__: term(),
  source: module(),
  tiles: [{StaticMaps.TileGrid.key(), term()}]
}