[Win10 64; 099 2019.20140] - addWarning(), addError()

Hi,

I the OP Class documentation, there’s methods to add an error or warning but I’ve never been able to use it without getting an error saying :

td.Error: Cannot set error outside of cook. Value:‘Warning msg’ Type:<class ‘str’>.
Results of run operation resulted in exception.

I’ve tried using it on different types of OP and tried running it from different source (ChopExec, TextDAT, Extensions), but the error persist.

Any advice?
Thanks!