Skip to content

incendium.exceptions.TagError

Cesar Roman edited this page Sep 23, 2020 · 9 revisions

Description

TagError inherits from Exception. This type of exception is to be raised whenever a read or write operation upon a tag fails.

Code Examples

# Imports.
import incendium.tag
from incendium.exceptions import TagError

def write_tags():
    """Perform bulk write."""
    tags = [
        '[tagProvider]Tags/T2',
        '[tagProvider]Tags/T3',
        '[tagProvider]Tags/T5',
        '[tagProvider]Tags/T7'
    ]
    values = [2, 3, 5, 7]

    ret = incendium.tag.write(tags, values)
    if 0 in ret:
        raise TagError('Error writing to one or more tags.')
Clone this wiki locally