idmtools.core.exceptions module

Define idmtools common exception as well as idmtools system exception handler.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

exception idmtools.core.exceptions.ExperimentNotFound(experiment_id: UUID, platform: TPlatform = None)

Bases: Exception

Thrown when an experiment cannot be found on a platform.

__init__(experiment_id: UUID, platform: TPlatform = None)

Initialize our ExperimentNotFound.

Parameters:
  • experiment_id – Experiment id to say wasn’t found

  • platform – Optional platform. Used in error message

exception idmtools.core.exceptions.UnknownItemException

Bases: Exception

Thrown when an unknown item type is passed to idmtools.

This usually occurs within the platform operation area.

exception idmtools.core.exceptions.NoPlatformException

Bases: Exception

Cannot find a platform matching the one requested by user.

exception idmtools.core.exceptions.TopLevelItem

Bases: Exception

Thrown when a parent of a top-level item is requested by the platform.

exception idmtools.core.exceptions.UnsupportedPlatformType

Bases: Exception

Occurs when an item is not supported by a platform but is requested.

exception idmtools.core.exceptions.NoTaskFound

Bases: Exception

Thrown when a simulation has no task defined.

idmtools.core.exceptions.idmtools_error_handler(exctype, value: Exception, tb)

Global exception handler. This will write our errors in a nice format as well as find document links if attached to the exception.

Parameters:
  • exctype – Type of exception

  • value – Value of the exception

  • tb – Traceback

Returns:

None