Exceptions
- class ThalesRemoteError(message)
Thales Remote Exception Class
This exception is thrown when an error is reported in the remote protocol, for example, when a parameter is out of range.
The error numbers can be found in the Remote2 manual in chapter 6 from page 37:
- Link without page number:
- Link with page number (may not work with every browser/pdf reader):
The following is an example for troubleshooting when an exception is thrown.
Example exception
Traceback (most recent call last): File "C:\XXX\Thales-Remote-Python\ie_example.py", line 62, in <module> zahnerZennium.setIESecondEdgePotential(10000) File "C:\XXX\Thales-Remote-Python\ThalesRemote\ThalesRemoteScriptWrapper.py", line 648, in setIESecondEdgePotential return self.setValue("IE_EckPot2", potential) File "C:\XXX\Thales-Remote-Python\ThalesRemote\ThalesRemoteScriptWrapper.py", line 1026, in setValue raise ThalesRemoteError(reply.rstrip("\r") + ThalesRemoteScriptWrapper.undefindedStandardErrorString) ThalesRemoteError.ThalesRemoteError: ERROR;100;1
Explanation
In the last line you can read what kind of error has occurred:
ThalesRemoteError.ThalesRemoteError: ERROR;100;1 ^ ^ | | | Error number from the Remote2 manual https://doc.zahner.de/manuals/remote2.pdf | You can read in the table in chapter 6 of the manual: | 100 | ERROR_PARAMETER_OUT_OF_RANGE | Sent value too low/high | ThalesRemoteError shows that it is an error generated by the library due to a response from the Zenniums containing an error.
The first two lines of the traceback show the file and line number and the content of the line where the error occurred.
File "C:\XXX\Thales-Remote-Python\ie_example.py", line 62, in <module> zahnerZennium.setIESecondEdgePotential(10000)
The error occurred in line 62 of the file ie_example.py with the statement
zahnerZennium.setIESecondEdgePotential(10000)
. This means that the value 10000, which should be set, is out of the allowed range.
- class TermConnectionError(message: str)
Term Connection Exception Class
This exception is thrown when an error occurs with the term communication, which has not yet been thrown by a socket exception.
After this error the connection must be completely rebuilt.