Get error details

  • Автор темы Автор темы Maddo7
  • Дата начала Дата начала

Maddo7

Client
Регистрация
09.05.2015
Сообщения
130
Реакции
6
Баллы
18
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?
 
First of all, p;lease tell what errors do you get.
 

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?
 
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.
 

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