Because of my test environment, VECTOR Canoe occasionally stops the measurement by itself. So I have an idea to send an email every time that the measurement stopped.
Thank you for all of the answer.
It would not be CAPL, but you could use CAPL to write a file with the error and a timestamp, and then have a python script running on background which simply reads the content of the file and sends it by email.
You have to write to the file in the handler on stopMeasurament{<your code> }
.
Here it is how to write a file in CAPL (StackOverflow question)