It would be nice if we could get some more additional verbose exceptions from the realm of TD.
As is now, we have 3 exceptions that are exretmly general:
tdError, tdAttributeError and tdWarning.
tdAttributeError gets called when a td-object does not have an parameter for example.
tdError is the base exception that gets raised always (?), at least that whats the debug is making me belive.
But catching tdError does not catch it. Running the following text results in:
try:
debug( op("base1").par.t34123 )
except tdError:
debug("Migh be invalid, I don't know..")
td.Error: File "/project1/text2", line 2
td.AttributeError: 'td.ParCollection' object has no attribute 't34123' Context:/project1/base1
I think what I would like to ask is for A:
Better documentation of existing td-specific exceptions in the docs
and B:
Additional, more verbose, Exceptions. For example, when trying to do anything with an invalid operator, td raises a generic tdError, instead a tdInvalidOperator error would be nice.
Another one might be tdChanDoesNotExist, or tdParameterDoesNotExist etc.
Edit: Might also be nice to have the exceptions in a seperate module, so instead of having the exceptions per se in the global namespace we would have to import td_exceptions
.