Get error details

Maddo7

Пользователь
Регистрация
09.05.2015
Сообщения
60
Благодарностей
2
Баллы
8
Oftentimes everything works perfectly in Projectmaker and then in ZP I get some errors I never saw before.

For that reason, whenever an error occurs, I give each running task a unique id and save a screenshot with the ID so I can assign additional logs to the picture.

The only thing that is missing is the info that normally lands in the ZP logs. Can I somehow extract that in my project so I can add it to my custom logs?
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
17 371
Благодарностей
4 272
Баллы
113
First of all, p;lease tell what errors do you get.
 

Maddo7

Пользователь
Регистрация
09.05.2015
Сообщения
60
Благодарностей
2
Баллы
8
I'm using this from the documentation:

C#:
var error = project.GetLastError();
var tmp = "";
if(error != null)
    tmp = string.Format("ActionComment: {0}.\r\nActionGroupId: {1}.\r\nActionId: {2}", error.ActionComment, error.ActionGroupId, error.ActionId);
 
return tmp;
and ActionComment always is empty.

Where can I get the error message theat appears in the ZP logs like activation email not found or result of if statement is false?
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
17 371
Благодарностей
4 272
Баллы
113
I'm using this from the documentation:

C#:
var error = project.GetLastError();
var tmp = "";
if(error != null)
    tmp = string.Format("ActionComment: {0}.\r\nActionGroupId: {1}.\r\nActionId: {2}", error.ActionComment, error.ActionGroupId, error.ActionId);

return tmp;
and ActionComment always is empty.

Where can I get the error message theat appears in the ZP logs like activation email not found or result of if statement is false?
There is exception property in LastError property - https://help.zennolab.com/en/v5/zennoposter/5.30.0.0/topic1162.html
But this works only for errors with exception.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)