taucmdr.error module

TAU Commander error handling.

Only error base classes should be defined here. Error classes should be defined in their appropriate modules.

exception taucmdr.error.ConfigurationError(value, *hints)[source]

Bases: taucmdr.error.Error

Indicates that TAU Commander cannot succeed with the given parameters.

This is most commonly caused by user error, e.g the user specifies measurement settings that are incompatible with the application.

message_fmt = '%(value)s\n\n%(hints)s\nTAU cannot proceed with the given inputs.\nPlease check the configuration for errors or contact %(contact)s for assistance.'
exception taucmdr.error.Error(value, *hints)[source]

Bases: Exception

Base class for all errors in TAU Commander.

value

Some value attached to the error, typically a string but could be anything with a __str__ method.

hints

list

String hints for the user to help resolve the error.

show_backtrace

bool

Set to True to include a backtrace in the error message.

message_fmt

str

Format string for the error message.

handle(etype, value, tb)[source]
message
message_fmt = "An unexpected %(typename)s exception was raised:\n\n%(value)s\n\n%(backtrace)s\nThis is a bug in TAU Commander.\nPlease send '%(logfile)s' to %(contact)s for assistance."
show_backtrace = False
exception taucmdr.error.ExperimentSelectionError(value, *hints)[source]

Bases: taucmdr.error.ConfigurationError

Indicates an error while selecting an experiment.

exception taucmdr.error.ImmutableRecordError(value, *hints)[source]

Bases: taucmdr.error.ConfigurationError

Indicates that a data record cannot be modified.

exception taucmdr.error.IncompatibleRecordError(value, *hints)[source]

Bases: taucmdr.error.ConfigurationError

Indicates that a pair of data records are incompatible.

exception taucmdr.error.InternalError(value, *hints)[source]

Bases: taucmdr.error.Error

Indicates that an internal error has occurred, i.e. a bug in TAU.

These are bad and really shouldn’t happen.

show_backtrace = True
exception taucmdr.error.ModelError(model, value)[source]

Bases: taucmdr.error.InternalError

Indicates an error in model data or the model itself.

exception taucmdr.error.ProjectSelectionError(value, *hints)[source]

Bases: taucmdr.error.ConfigurationError

Indicates an error while selecting a project.

exception taucmdr.error.UniqueAttributeError(model, unique)[source]

Bases: taucmdr.error.ModelError

Indicates that duplicate values were given for a unique attribute.

taucmdr.error.excepthook(etype, value, tb)[source]

Exception handler for any uncaught exception (except SystemExit).

Replaces sys.excepthook.

Parameters:
  • etype – Exception class.
  • value – Exception instance.
  • tb – Traceback object.