psyclone.errors

This module provides various error classes used in PSyclone

Classes

  • LazyString: Utility that defers any computation associated with computing a

class psyclone.errors.LazyString(func)

Utility that defers any computation associated with computing a string until the string is required. This is particularly useful for exceptions, where the string will typically not need to be computed unless the program is about to stop.

Parameters:

func (function) – a function that computes a string.

Raises:

TypeError – if the func argument is not a function.

Inheritance

Inheritance diagram of LazyString

Exceptions

  • PSycloneError: Provides a PSyclone specific error class as a generic parent class for

  • GenerationError: Provides a PSyclone specific error class for errors found during PSy

  • FieldNotFoundError: Provides a PSyclone-specific error class when a field with the

  • InternalError: PSyclone-specific exception for use when an internal error occurs (i.e.

exception psyclone.errors.PSycloneError(value)

Provides a PSyclone specific error class as a generic parent class for all PSyclone exceptions.

Parameters:

value (str) – the message associated with the error.

Inheritance

Inheritance diagram of PSycloneError
exception psyclone.errors.GenerationError(value)

Provides a PSyclone specific error class for errors found during PSy code generation.

Parameters:

value (str) – the message associated with the error.

Inheritance

Inheritance diagram of GenerationError
exception psyclone.errors.FieldNotFoundError(value)

Provides a PSyclone-specific error class when a field with the requested property/ies is not found.

Parameters:

value (str) – the message associated with the error.

Inheritance

Inheritance diagram of FieldNotFoundError
exception psyclone.errors.InternalError(value)

PSyclone-specific exception for use when an internal error occurs (i.e. something that ‘should not happen’).

Parameters:

value (str) – the message associated with the error.

Inheritance

Inheritance diagram of InternalError