Representing Errors

class tgtools.utils.errlog.Err(label: str = '', msg: str = '', timestamp: str = '')

Representation of an error resulting from an interaction with a radio.

__init__(label: str = '', msg: str = '', timestamp: str = '')

Instantiating parameters:

Parameters:
  • label (str) – Arbitrary label identifying the device causing the error (typically its IP address and/or its name.

  • msg (str) – A descriptive error message.

  • timestamp (str) – Timestamp (computer time) when the error occured. If not provided, then automatically set to instantiation time.

as_dict() dict

Dictionary representation.

Returns:

Dictionary representation of error.

Return type:

dict

label

An arbitrary label, typically identifying the device.

msg

Error message.

timestamp

Timestamp for when error occurs.