amulet.api.errors
module¶
- exception amulet.api.errors.FormatError[source]¶
Bases:
Exception
A base error for all errors related to the
FormatWrapper
class.
- exception amulet.api.errors.LoaderNoneMatched[source]¶
Bases:
FormatError
An error thrown if no loader could be found that could load the given data.
- exception amulet.api.errors.BlockException[source]¶
Bases:
Exception
An error thrown by the
Block
class.
- exception amulet.api.errors.ChunkLoadError[source]¶
Bases:
EntryLoadError
An error thrown if a chunk failed to load for some reason.
This may be due to a corrupt chunk, an unsupported chunk format or just because the chunk does not exist to be loaded.
Catching this error will also catch
ChunkDoesNotExist
>>> try: >>> # get chunk >>> chunk = world.get_chunk(cx, cz, dimension) >>> except ChunkLoadError: >>> # will catch all chunks that have failed to load >>> # either because they do not exist or errored during loading.
- exception amulet.api.errors.ChunkDoesNotExist[source]¶
Bases:
EntryDoesNotExist
,ChunkLoadError
An error thrown if a chunk does not exist and therefor cannot be loaded.
>>> try: >>> # get chunk >>> chunk = world.get_chunk(cx, cz, dimension) >>> except ChunkDoesNotExist: >>> # will catch all chunks that do not exist >>> # will not catch corrupt chunks >>> except ChunkLoadError: >>> # will only catch chunks that errored during loading >>> # chunks that do not exist were caught by the previous except section.
- exception amulet.api.errors.ChunkSaveError[source]¶
Bases:
Exception
An error thrown if there was an error during the chunk saving process.
- exception amulet.api.errors.DimensionDoesNotExist[source]¶
Bases:
Exception
An error thrown if trying to load data from a dimension that does not exist.
- exception amulet.api.errors.ObjectReadWriteError[source]¶
Bases:
Exception
An error thrown when the raw level data cannot be read from or written to.
This is usually because the data has been opened somewhere else.
- exception amulet.api.errors.ObjectReadError[source]¶
Bases:
ObjectReadWriteError
An error thrown when the raw level data cannot be read from.
This is usually because the data has been opened somewhere else.
- exception amulet.api.errors.ObjectWriteError[source]¶
Bases:
ObjectReadWriteError
An error thrown when the raw level data cannot be written to.
This is usually because the data has been opened somewhere else.