safe.common.exceptions module

InaSAFE Disaster risk assessment tool developed by AusAid - Exception Classes.

Custom exception classes for the SAFE library

Contact : ole.moller.nielsen@gmail.com

Note

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

exception safe.common.exceptions.AggregationError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if aggregator state is not valid when trying to run it.

exception safe.common.exceptions.BoundingBoxError[source]

Bases: safe.common.exceptions.InaSAFEError

For errors relating to bboxes

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.BoundsError[source]

Bases: safe.common.exceptions.InaSAFEError

For points falling outside interpolation grid

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.CallGDALError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if failed to call gdal command. Indicate by error message that is not empty

exception safe.common.exceptions.CanceledImportDialogError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if import process canceled

exception safe.common.exceptions.ContourCreationError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception for when creating contours from shakemaps goes wrong

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.DownloadError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when downloading file is error.

exception safe.common.exceptions.EmptyDirectoryError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when output directory is empty string path.

exception safe.common.exceptions.FileMissingError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if a file cannot be found.

exception safe.common.exceptions.FileNotFoundError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when a file could not be found.

exception safe.common.exceptions.FunctionParametersError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when function parameters are not valid.

exception safe.common.exceptions.GetDataError[source]

Bases: safe.common.exceptions.InaSAFEError

When layer data cannot be obtained

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.GridXmlFileNotFoundError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception for when an grid.xml could not be found

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.GridXmlParseError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception for when something went wrong parsing the grid.xml

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.HashNotFoundError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when a no keyword hash can be found.

exception safe.common.exceptions.HelpFileMissingError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if a help file cannot be found.

exception safe.common.exceptions.ImportDialogError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if import process failed.

exception safe.common.exceptions.InaSAFEError[source]

Bases: exceptions.RuntimeError

Base class for all user defined exceptions

suggestion = 'An unspecified error occurred.'
exception safe.common.exceptions.InsufficientMemoryWarning[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when there is a possible insufficient memory.

exception safe.common.exceptions.InsufficientOverlapError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception raised if an error occurs during extent calculation because the bounding boxes do not overlap.

exception safe.common.exceptions.InsufficientParametersError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when insufficient parameters have been set.

exception safe.common.exceptions.InvalidAggregationKeywords[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when the aggregation keywords is invalid.

exception safe.common.exceptions.InvalidAggregatorError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if aggregator state is not valid when trying to run it.

exception safe.common.exceptions.InvalidBoundingBoxError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception raised if an error occurs during extent calculation because one of the extents is invalid.

exception safe.common.exceptions.InvalidClipGeometryError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when clip geometry is invalid.

exception safe.common.exceptions.InvalidExtentError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if an extent is not valid.

exception safe.common.exceptions.InvalidGeometryError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when a feature geometry is invalid or none.

exception safe.common.exceptions.InvalidLayerError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when a gis layer is invalid

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.InvalidParameterError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when an invalid parameter is passed to a function.

exception safe.common.exceptions.InvalidProjectionError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception raised if a layer needs to be reprojected.

exception safe.common.exceptions.InvalidProvenanceDataError[source]

Bases: safe.common.exceptions.InaSAFEError

When a path for a metadata xml is not correct

suggestion = 'Check that the IF produced all the required data'
exception safe.common.exceptions.KeywordDbError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when an error is encountered with keyword cache db.

exception safe.common.exceptions.KeywordNotFoundError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when a keyword’s key (e.g. unit) cannot be found.

exception safe.common.exceptions.LegendLayerError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception raised when trying to create a legend from a QgsMapLayer that does not have suitable characteristics to allow a legend to be created from it.

exception safe.common.exceptions.MemoryLayerCreationError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if an error occurs creating the cities file

exception safe.common.exceptions.MetadataCastError[source]

Bases: safe.common.exceptions.InaSAFEError

When a path for a metadata xml is not correct

suggestion = 'Check that the XML value is of the correct type'
exception safe.common.exceptions.MetadataInvalidPathError[source]

Bases: safe.common.exceptions.InaSAFEError

When a path for a metadata xml is not correct

suggestion = 'Check that the XML path of the property is correct'
exception safe.common.exceptions.MetadataLayerConstraintError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if the metadata does not match with the IF base class.

It means the layer constraint specified in the metadata is not supported by the base class

exception safe.common.exceptions.MetadataReadError[source]

Bases: safe.common.exceptions.InaSAFEError

When a metadata xml is not correctly formatted can’t be read

suggestion = 'Check that the file is correct'
exception safe.common.exceptions.MethodUnavailableError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if the requested import cannot be performed dur to qgis being to old

exception safe.common.exceptions.NoAttributeInLayerError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if the attribute not exists in the vector layer

exception safe.common.exceptions.NoFeaturesInExtentError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception that gets thrown when no features are within the extent being clipped.

exception safe.common.exceptions.NoFunctionsFoundError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when a no impact calculation functions can be found.

exception safe.common.exceptions.NoImpactClassFoundError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if the impacted object class is not present in the calculation results

exception safe.common.exceptions.NoKeywordsFoundError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when no keywords file exist for a layer.

exception safe.common.exceptions.NoValidLayerError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when there no valid layer in inasafe.

exception safe.common.exceptions.PointsInputError[source]

Bases: safe.common.exceptions.InaSAFEError

For invalid inputs to numeric point functions

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.PolygonInputError[source]

Bases: safe.common.exceptions.InaSAFEError

For invalid inputs to numeric polygon functions

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.PostProcessorError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when requested import cannot be performed if QGIS is too old.

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.RadiiException[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if radii for volcano buffer is not as we expect.

suggestion = 'Please make sure the radii for volcano buffer are monotonically increasing.'
exception safe.common.exceptions.ReadLayerError[source]

Bases: safe.common.exceptions.InaSAFEError

When a layer can’t be read

suggestion = 'Check that the file exists and you have permissions to read it'
exception safe.common.exceptions.ReportCreationError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when error occurs during report generation.

exception safe.common.exceptions.ShapefileCreationError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if an error occurs creating the cities file

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.StyleError[source]

Bases: safe.common.exceptions.InaSAFEError

An exception relating to reading / generating GIS styles

exception safe.common.exceptions.StyleInfoNotFoundError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when a no styleInfo can be found.

exception safe.common.exceptions.TemplateElementMissingError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when some element ids are missing from template.

exception safe.common.exceptions.TemplateLoadingError[source]

Bases: safe.common.exceptions.InaSAFEError

Raised when loading the template is error.

exception safe.common.exceptions.TestNotImplementedError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception for when a test exists only as a stub.

exception safe.common.exceptions.TranslationLoadError[source]

Bases: safe.common.exceptions.InaSAFEError

Custom exception handler for whe translation file fails to load.

exception safe.common.exceptions.UnsupportedProviderError[source]

Bases: safe.common.exceptions.InaSAFEError

For unsupported provider (e.g. openlayers plugin) encountered.

exception safe.common.exceptions.VerificationError[source]

Bases: safe.common.exceptions.InaSAFEError

Exception thrown by verify()

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.WindowsError[source]

Bases: safe.common.exceptions.InaSAFEError

For windows specific errors.

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.WriteLayerError[source]

Bases: safe.common.exceptions.InaSAFEError

When a layer can’t be written

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.WrongDataTypeException[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if expected and received data types are different

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'
exception safe.common.exceptions.ZeroImpactException[source]

Bases: safe.common.exceptions.InaSAFEError

Raised if an impact function return zero impact

suggestion = 'Please ask the developers of InaSAFE to add a suggestion.'