pyg4ometry.exceptions

Exceptions

NullMeshError

Null Mesh exception. Should be raised when the output of

IdenticalNameError

Exception for trying to add the same name to the geant4 registry.

FLUKAError

Common base class for all non-exit exceptions.

FLUKAInputError

Common base class for all non-exit exceptions.

Module Contents

exception pyg4ometry.exceptions.NullMeshError(arg)

Bases: Exception

Null Mesh exception. Should be raised when the output of mesh.toPolygons evaluates to the empty list. arg can be a user-provided message (string), or a SolidBase-derived instance.

exception pyg4ometry.exceptions.IdenticalNameError(name, nametype=None)

Bases: Exception

Exception for trying to add the same name to the geant4 registry.

Parameters:
  • name (str) – the name that has been duplicated

  • nametype (str) – optional extra information regarding the nature of thecduplicate (“material”, “solid”, etc.)

name
nametype
exception pyg4ometry.exceptions.FLUKAError

Bases: Exception

Common base class for all non-exit exceptions.

exception pyg4ometry.exceptions.FLUKAInputError(message)

Bases: Exception

Common base class for all non-exit exceptions.