-
-
Notifications
You must be signed in to change notification settings - Fork 2
incendium.exceptions.TagError
César Román edited this page Feb 11, 2022
·
9 revisions
TagError inherits from Exception. This type of exception is to be raised whenever a read or write operation upon a tag fails.
Args:
- message (str): The error message.
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.")