sio3pack.exceptions

Package Contents

exception sio3pack.exceptions.SIO3PackException(message, full_message=None)[source]

Bases: Exception

A base class for all custom exceptions raised by SIO3Pack.

Parameters:
  • message (str) – A short description of the error.

  • full_message (str) – A detailed description of the error, if available.

property full_message
exception sio3pack.exceptions.ImproperlyConfigured(message, full_message=None)[source]

Bases: sio3pack.exceptions.general.SIO3PackException

Exception raised when the package is improperly configured, i.e., using Django features without Django being installed.

Parameters:
  • message (str)

  • full_message (str)

exception sio3pack.exceptions.PackageAlreadyExists(problem_id)[source]

Bases: sio3pack.exceptions.general.SIO3PackException

Exception raised when trying to create a package for a problem that already has a package.

Parameters:

problem_id (int) – The ID of the problem for which the package already exists.

exception sio3pack.exceptions.ProcessPackageError(message, full_message=None)[source]

Bases: sio3pack.exceptions.general.SIO3PackException

Exception raised when there is an error processing a package.

Parameters:
  • message (str)

  • full_message (str)

exception sio3pack.exceptions.UnknownPackageType(arg)[source]

Bases: sio3pack.exceptions.general.SIO3PackException

Exception raised when trying to load a package of an unknown type. This can happen when the package file is not recognized or when the package is not a valid package type in the database.

Parameters:
  • arg (str | int) – The path to the package file or the problem ID.

  • arg

class sio3pack.exceptions.ParsingFailedOn(*args, **kwds)[source]

Bases: enum.Enum

Enum to represent the part of the workflow that failed to parse.

exception sio3pack.exceptions.WorkflowCreationError(message, full_message=None)[source]

Bases: sio3pack.exceptions.general.SIO3PackException

Raised when there is an error creating a workflow.

Parameters:
  • message (str)

  • full_message (str)

exception sio3pack.exceptions.WorkflowParsingError(message, failed_on, extra_msg=None, data=None, full_message=None)[source]

Bases: sio3pack.exceptions.general.SIO3PackException

Raised when there is an error parsing a workflow configuration.

Parameters:
  • message (str) – A short description of the error.

  • failed_on (ParsingFailedOn) – The part of the workflow that failed to parse.

  • extra_msg (str) – Additional message to append to the error message.

  • data (dict) – Additional data related to the error.

  • full_message (str) – A full message describing the error, if available.

set_data(key, value)[source]

Set additional data for the exception.

Parameters:
  • key (str) – The key for the data.

  • value (str) – The value for the data.