tinyDB-Error Handling

How can I know if an operation like clearTag or storeValue in TinyDB is successfull or not?

You get the content of the request if successful?

I have never seen an error raised from tinydb, but suggest you would get a screen error if something failed

When writing a new entry I must read it to see if it was written.
When updating I must reread and compare with the old values
and in the case of deleting an entry I must reread to see if it was deleted.

After ClearTag use call GetTag to check what is still in the Tag List so you can see what is in the Tag list. If the Tag you ‘cleared’ is not there ClearTag was successful.

After StoreValue, use GetValue to see what you stored using the Tag you stored.

TinyDb does not have a method that automatically tells you if a command is successful.

Regards,
Steve

There is a general purpose error catching block in the Screen1 blocks.
That’s the error catcher of last resort.

Sorry, but I can’t find the error catcher.

component_event

@ABG; “when Screen1 ErrorOccurred” doesn’t work in this case.
As SteveCG wrote:
TinyDb does not have a method that automatically tells you if a command is successful.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.